Own-agent checks: reject the Actions bot id in admit.mjs and test the source label in pr-verify

未关闭 适合新手
#17,374 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
74/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
github-actions, javascript, node.js
领域
ci-cd, tooling

调研方向

从 .github/scripts/intake-triage/admit.mjs 第 274 行和第 295-298 行附近开始,其中规则校验器和 ownAgentIds 接受正整数,并与第 1101 行的 ACTIONS_BOT_ID 比较。然后阅读 .github/scripts/pr-verify/resolve-pr.mjs 第 1008 行附近,并将其 source: 标签检查与 admission 中的 SOURCE_LABEL 以及 babysit_verify_evidence.py 比较。添加测试,用于拒绝 Actions bot id 和格式错误的 source: 标签,然后运行相关的 intake-triage 和 pr-verify 测试套件;完成意味着两个检查都会尽早失败,而已发布的规则仍像之前一样接纳并验证相同的 issue。

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

描述

Summary

Two checks that #16999 added for own-agent issues are looser in one place than in the others that read the same rule.

  1. .github/scripts/intake-triage/admit.mjs: the rules validator (line 274) and ownAgentIds (lines 295 to 298) accept any positive integer in own-agents.identities, including the GitHub Actions bot id (ACTIONS_BOT_ID, line 1101), which the rules file's description and the module's comment say must never be listed. The Python merge gate drops that id. No admission can come from it today: apply-verdict.mjs writes nothing for an author authorTrust refuses, and the shipped list is ["lanes-app"]. This is hardening.
  2. .github/scripts/pr-verify/resolve-pr.mjs line 1008 counts source: labels (sourceLabels(...).length === 1) but never tests the label against SOURCE_LABEL, which admission (admit.mjs) and the merge gate (babysit_verify_evidence.py) both do. A malformed source: label passes pr-verify and is refused at the merge gate, so the pull request stalls instead of failing early.

Evidence

  • Lines read at d55250ec; the files are unchanged on main since.
  • Found by a review of the byte-copied files in melodic-software/pr-pipeline-sandbox#387. Neither was seen in a live run.

Done when

  • The rules validator and ownAgentIds reject the Actions bot id, with a test for each.
  • pr-verify tests the single source: label against the same pattern admission uses, with a malformed-label test.
  • No change to which issues are admitted or verified under the shipped rules.
主要语言
Shell
星标
22
派生
2
平均合并
1 小时 47 分钟
30 天内合并 PR
942

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

melodic-software/claude-code-plugins 的其他 Issue

查看 melodic-software/claude-code-plugins 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

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