feat(gate): agent 分支 PR 须 agent-approved label 才放行——draft 口头约定升级为机制 - #189
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
🔒 Repowise is not analyzing this repository The PR bot is free on public repositories. This one is private, which needs a Pro plan. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe pull request workflow adds an ChangesAgent branch gating
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code Intel change risk
Top signals
revspec: |
版本位五处同步(Cargo.toml、Cargo.lock、cli-head-parity 夹具的 old+new 两份 stdout、 toolchain-versions.v1.json 的 declaredIn 绑定),和 v0.7.0-beta.5 (#164) 完全同一组文件。 CHANGELOG 补上一批漏账:beta.5 之后的 13 个 commit 里只有 4 个进过 `[Unreleased]`。 本次补写 6 条正文条目(锚点验证闸 #151、扫描面具名排除闸门 #152、文档语言首选项 #155、 测试不对称信号认 tests.rs 约定 #170、sentrux shim lite 门与权威 baseline 分居 #182、 测试临时目录按进程归属 #175)与 3 条 Notes(#179 变异测试补测、#189 agent-approved label 门、#156 OpenSpec 记录核实),`[Unreleased]` 收敛为 `[0.7.0-beta.6] — 2026-08-05`。 漏账本身是 #174 想解的那条单行道税的现症,不是本次新引入的。 发布前证据(本机,非 CI): - `cargo test -p code-intel --locked`:3432 passed / 0 failed,55 个测试二进制。 首轮 `-j` 默认并行撞本机 `rustc-LLVM ERROR: out of memory`(宿主 commit 贴顶, 与 #123 bug 1 同因),`-j 2` 复跑全绿——是环境限制不是代码红灯。 - `cli_head_parity` 3/3、`toolchain_versions` 5/5:版本绑定判据全绿。 - `tests/test_repository_layout.py` 5/5、`tests/test_skill_package.py` 18/18。 - 权威 self-scan(release 构建,`run execute --doctor-require-repowise false`): exitCode 0,9 个节点全 pass,anchors 4596 verified / 0 approximate / 0 dropped, `failures.process` 与 `failures.domain` 皆空。 不含任何行为变更:本次 diff 只有版本字符串与 CHANGELOG。
干什么
pr-gate.yml新增agent-gatejob:head 分支匹配grok/**/agent/**/codex/**的 PR,必须带agent-approvedlabel(人点的)检查才绿;非 agent 分支直接通过。label 已建(agent-approved,绿色)。为什么
#174 试点(PR #187)确认:本仓合并惯例是「绿灯即合」,而 agent PR 不误合的唯一防线是「记得开 draft」——口头约定,零机制。编排放量后这是必然事故点。本 job 把人审动作物化成 label,配合 branch protection required check(本 PR 合并后由维护者启用)形成真闸。
配套(合并后一步)
branch protection on
main:required checks =change-risk+agent-gate+ ci.yml 四个 job,enforce_admins开。ci.ymlpull_request无 path 过滤,所有 PR 都会产生这些 check,不会有 docs-only PR 卡死问题。验证
change-riskjob 一致,复用同一触发集(labeled/unlabeled已在,点 label 即重跑)。grok/**分支)将是第一个真实用例:未打 label 应红,打上应绿。Refs #184