Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Declare target effects and gate them at plan time

Đang mở
#644 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 5 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
build-system

Hướng nghiên cứu

Bắt đầu bằng cách lần theo luồng của model mục tiêu, planning và runner, cùng entry point describe --json; xem xét plugin SDK và issue #100 trước khi chọn effect contract. Công việc được xem là hoàn tất khi các target khai báo effects, planning từ chối các dependency chưa được cấp quyền trước khi thực thi bằng một lỗi dành riêng cho target và describe --json báo cáo các effect đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement target/backlog
Problem

Fallout targets range from writing into artifacts/ to publishing packages to nuget.org and tagging releases. Nothing in the target model distinguishes them. A caller that wants to run a build without changing anything outside the working tree has no way to ask which targets are safe.

For an automated caller the only safe policy is therefore to never run the build unattended, which removes most of the value. The Continuous Delivery direction (milestone #8) adds deployment targets, which widens the gap.

Outcome

A target declares the class of effect it has, and the runner refuses to reach a target whose effect class was not granted.

Sketch:

Target Compile => _ => _
    .Effect(Effects.LocalFilesystem)
    .Executes(...);

Target PushToNuGet => _ => _
    .Effect(Effects.RemoteMutation, Effects.Irreversible)
    .Executes(...);

fallout run Pack --allow local succeeds. A plan that reaches a RemoteMutation target fails during planning, before any target executes, naming the target and the grant it needs.

Acceptance criteria
  • Targets can declare one or more effect classes
  • Effect classes are checked at plan time, so a run stops before the first target executes
  • The error names the target and the grant required
  • Effect classes propagate through dependencies: depending on a remote-mutation target requires that grant
  • describe --json exposes each target's effect classes
Open questions
  • Is an undeclared target permissive or restrictive by default? Restrictive is safer, but changes behaviour for every existing build.
  • Fixed set of effect classes, or an open set that plugins can extend?
  • Does the contract belong in the plugin SDK, given #100 (plugin discovery and load model) has to settle a related trust question?
Notes

Useful outside automation too: --allow remote as a CI-only flag prevents accidental publishes from a developer machine.

Ngôn ngữ chính
C#
Star
169
Fork
21
Merge trung bình
3 ngày 7 giờ
Pull request đã merge (30 ngày)
9

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Fallout-build/Fallout

Tất cả issue của Fallout-build/Fallout

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.