Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Declare target effects and gate them at plan time

未关闭
#644 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 5 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
csharp
领域
build-system

调研方向

首先跟踪目标模型、规划和 runner 的流程,以及 describe --json 入口点;在选择效果契约之前,查看 plugin SDK 和 issue #100。完成的标准是:targets 声明 effects,规划在执行前使用针对 target 的错误拒绝未获授权的依赖项,并且 describe --json 报告这些 effects。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
C#
星标
169
派生
21
平均合并
3 天 7 小时
30 天内合并 PR
9

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Fallout-build/Fallout 的其他 Issue

查看 Fallout-build/Fallout 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。