fix(ci): fail post.sh when the model stages a path outside the conflict set
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 74/100
调研方向
Read .github/scripts/merge-base/post.sh and its existing staged-path checks, then inspect .github/scripts/merge-base/post.test.sh to follow the test patterns. Compare the final index against the stage-0 snapshot and the snapshot’s unmerged paths; add a test for an unexpected staged path. Done when that case fails with a distinct reason and the existing checks still pass.
由索引模型根据 Issue 内容生成。
描述
Problem
.github/scripts/merge-base/post.sh escalates on an unmerged entry, a
conflict marker in any entry staged since the snapshot, and any change
under .github/workflows/. It does not limit which paths the model may
stage. If resolve-conflicts in CI mode ever runs git add -A, git add . or a directory (a model mistake, or steered by text in the conflicted
files), any other modified or untracked file in the checkout is staged,
passes the marker scan, and reaches git write-tree and the commit.
The skill's allowed-tools cannot close this: Bash(git add:*) is a
prefix rule, and the rule syntax has no way to exclude -A, --all,
. or :/. The skill forbids bulk staging in prose, and the
no-wildcard-staging eval grader measures compliance, but nothing on
the runner enforces it.
Proposed fix
In post.sh, after the existing checks, fail closed (new reason, for
example unexpected-path-staged) when the final index holds an entry
that is neither identical to a stage-0 snapshot entry nor a path the
snapshot held unmerged. Mirror the workflow-staged check and add the
case to post.test.sh.
Related
Raised in review of #7178:
https://github.com/melodic-software/claude-code-plugins/pull/7178#discussion_r4244581612
- 主要语言
- Shell
- 星标
- 22
- 派生
- 2
- 平均合并
- 8 小时 34 分钟
- 30 天内合并 PR
- 946
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
melodic-software/claude-code-plugins 的其他 Issue
-
needs-human needs-triage
难度 2/5 1-3 小时 新手友好度 82/100
melodic-software/claude-code-plugins#7636 · 1 条评论 ·
维护者通常 1 天内回复
-
agent-ready needs-human
难度 2/5 1-3 小时 新手友好度 77/100
melodic-software/claude-code-plugins#7598 · 4 条评论 ·
维护者通常 1 天内回复
-
good first issue priority: low
难度 2/5 1-3 小时 新手友好度 62/100
melodic-software/claude-code-plugins#7530 · 1 条评论 ·
维护者通常 1 天内回复
-
needs-human priority: medium
难度 2/5 1-3 小时 新手友好度 65/100
melodic-software/claude-code-plugins#7455 · 1 条评论 ·
维护者通常 1 天内回复
-
priority: medium
难度 2/5 1-3 小时 新手友好度 68/100
melodic-software/claude-code-plugins#7351 · 2 条评论 ·
维护者通常 1 天内回复
查看 melodic-software/claude-code-plugins 的全部 Issue
相似的 Issue
-
Add Photocraft未关闭enhancement
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 78/100
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
-
needs-triage
难度 2/5 1-3 小时 新手友好度 84/100
gke-labs/kube-agents#3394 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复