docs(agents): 合并指引收口为一条实测的队列教条 —— 两处 --auto 禁令与队列 hedge 不再自相矛盾 (#6118) - #6255
Merged
Conversation
AGENTS.md 三处合并指引互相矛盾:§7 标题「Never `gh pr merge --auto`」、 Post-Task Checklist 第 2 条重复同一禁令,而 §7 自己下面又写着「队列启用后 add to queue 才是正道」—— 挂 auto-merge 正是入队手段,今天的落地实践走的 也正是 auto-merge → 入队 → rebuild-then-land。 按本仓实测重写(⛔ 不照抄 objectui#3522 的叙述,也不外推它的 405): - §7 改为「在已绿、已验收、非 draft 的 PR 上挂 auto-merge,由队列合并」, 并写明本仓「队列会校验」的具体所指:22 个 workflow 中 3 个带 `on: merge_group:`(ci.yml / lint.yml / spec-liveness-check.yml), Actions API 报 2742 次 merge_group 运行,最近 30 次全在 gh-readonly-queue/main/pr-* 世代上且全绿;merge-queue-triage.yml 不是 订阅者而是 workflow_run 观察者。 - 保留旧禁令为真的那一半:⛔ 不在没绿/没验收的 PR 上挂 —— 红着挂不会入队 只会藏起来(#4852 空转 100 分钟)。 - 精确写出队列的边界:只有 required 集里的检查有拦截力。#6067 的队列世代 Lint & Type Check 已 completed/failure(run 31136745851)仍于 01:13Z 合入, 其红随 merge ref 毒化后续每个 PR 的 ESLint job(#6100,同形于 #5584 → #5601 → #5615);#5617 下维护者已把 ESLint 与 TypeScript Type Check 加入 分支保护 required 集与队列检查集。 - 三条今晚实测的重挂情形:队列踢出会掉 auto-merge(#6059,01:03:02Z 踢出 → 01:04:15Z 重挂 → 01:25:00Z 落地)、前车失败导致的连带踢出按设计无评论 (merge-queue-triage.yml 只在 conclusion == failure 时发言)、转回 draft 同时掉 auto-merge 与队列成员资格(仓内操作纪律,非本轮 API 实测,已标注)。 - 未测项如实标注:直接 `gh pr merge`(非 auto)在本仓是否 405 —— 需在活 PR 上真做一次合并才能确证,不值得做;objectui 的 405 不外推。 - Post-Task Checklist 第 2 条改指同一条路径;§10 里「(and the merge queue, once enabled)」这个同族过期 hedge 一并改正。 编号完整性:§1–§11 一个都没动位。反向引用核过 —— pm-dispatch/SKILL.md:1544 引 §7 的「无队列时串行合并」仍成立(fallback 段原样保留),:1590 引 §3、 :1736 引 §10、AGENTS.md:83 引 §8、os-dev.md:114 引 §9 均未受影响。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BDmDsu2575gDxeMCxXhDE3
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
hotlong
marked this pull request as ready for review
August 7, 2026 12:46
This was referenced Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6118
AGENTS.md 的合并指引三处互相矛盾:§7 标题写「Never
gh pr merge --auto」,Post-Task Checklist 第 2 条重复同一禁令,而 §7 自己下面又写着「队列启用后 add to queue 才是正道」—— 挂 auto-merge 正是入队手段,今天全部落地也正是走这条路。本 PR 把三处收口成一条按本仓实测写成的合并教条。⛔ 按单里的硬约束执行:不照抄 objectui#3522 的叙述,不外推它的 405 实测。下面每一条断言要么在本仓测到(附 PR / run 号),要么显式标注未测。
前提复核(先证后写)
前提成立,但行号又漂了一轮。分诊评论给的是 184 / 188 / 761;我的 base(
01faeb1,= #6237)上是 193 / 197 / 770。按内容定位,不按行号。7. **Merge only after remote CI is fully green. Never `gh pr merge --auto`.**Once the repo's merge queue is enabled, "add to queue" IS the sanctionednever `gh pr merge --auto`)全仓
grep -rn -- "merge --auto"只有这两处禁令(均在 AGENTS.md),没有第三处需要同步。改写的四处
1. §7 标题(193–196)—— 禁令翻转为正道
改前
改后
2. §7 的 hedge(197–206)—— 「once enabled」的条件句换成本仓读数
改前(半更新的 hedge,与标题打架)
改后(拆成四段:实测所指 → 旧禁令为真的那一半 → required 集的边界 → 三条重挂情形 + 一条非修法 + 未测项 + fallback)
merge-queue-triage.yml」。实测该文件的on:是workflow_run(workflows: [CI], types: [completed]),merge_group只出现在它的if:过滤条件里 —— 它观察队列世代的 CI 结果并在红时发诊断评论,自己不在队列世代上跑。所以订阅者是 3 个,观察者 1 个,两者作用不同,散文里分开写了。旁证:仓内.changeset/agents-releases-freeze-merge-queue.md自述「the three required-check workflows gainmerge_group:triggers」。3. Post-Task Checklist 第 2 条(770)—— 第二处禁令
改前
改后
4. §10 的同族过期 hedge(原 256 行)—— 顺手改正,同一处矛盾的第四张脸
改前:
CI on the PR (and the merge queue, once enabled) validates the merge commit itself改后:
CI on the PR, and then the merge queue on its rebuilt generation (§7), validates the merge commit itself「once enabled」和 §7 的 hedge 是同一句条件句的两个副本;留着它,读者仍会以为队列没开。
实测证据表(每条断言 → 证据号 / 「未测」)
event=merge_group共 2742 次运行;最近 30 次全部落在gh-readonly-queue/main/pr-*上(如pr-6237-…/pr-6233-…/pr-6228-…/pr-6210-…/pr-6209-…),全successon: merge_group:origin/main(01faeb1) 上 grep:ci.yml:16/lint.yml:13/spec-liveness-check.yml:30;release.yml:471是注释,不是触发器merge-queue-triage.yml是观察者不是订阅者on: workflow_run(:36–39),merge_group只在:47的if:里merge-queue-triage于 01:03:27Z 评论,点名 run 31136158512 与失败用例merge-queue-triage.yml自述:Fires on conclusion == failure ONLY. 'cancelled' is the queue evicting an entry because something AHEAD of it failed … so it gets no commentgh-readonly-queue/main/pr-6067-db0d53c2…,Lint & Type Checkrun 31136745851 =completed/failure(01:12:11Z),合并于 01:13Z(merge commitf226605)mergeable_state=blocked,对照 #6093 零 review 合入(⇒ 本仓不要求 review ⇒blocked只能来自 required check)rerun_failed_jobs复用原 run 的提交与合并 ref,拿不到之后合入的修复.claude/skills/pm-dispatch/SKILL.mdOperational note 1(:146)与接力纪律(:1727)—— 仓内在册操作纪律gh pr merge在本仓是否 405显式标注为未测/未复测的两项
gh pr merge是否 405 —— 要确证只能在一个活 PR 上真做一次合并,按单里明令不做这个实验。散文原文:"Not measured here … objectui returns 405; that is not extrapolated to this repo (objectui#3243) — separate rulesets, and 红的 ESLint job 没有拦住合并:PR #5584 在 ESLint 已红 19 分钟的情况下过队合入 —— main 的 required-status-check 集需要维护者核查 #5617's cross-repo audit found the two configured differently."(红的 ESLint job 没有拦住合并:PR #5584 在 ESLint 已红 19 分钟的情况下过队合入 —— main 的 required-status-check 集需要维护者核查 #5617 的跨仓审计正好记录了两仓配置不同:objectui 零merge_group订阅,队列必需集为空。)api.github.com的未认证 REST 被代理拦掉(HTTP 403),timeline 事件读不到,而复测它需要真去 arm/翻转一个活 PR。散文里就地标注 "not an API measurement",不冒充实测。反向引用与编号完整性
⛔ 一个编号都没动(§1–§11 位置不变),全部为就地改写。逐条核过:
.claude/skills/pm-dispatch/SKILL.md:1544.claude/skills/pm-dispatch/SKILL.md:1590.claude/skills/pm-dispatch/SKILL.md:1736AGENTS.md:83.claude/agents/os-dev.md:114.changeset/agents-releases-freeze-merge-queue.md:6AGENTS.md:114的「§7 Built」指的是north-star.mdx的 §7,不是本文件的 §7 —— 未受影响。门禁
关于
pnpm test/pnpm typecheck:本 PR 只动 AGENTS.md 一个文件,不属于任何 package 的源码面,跑包级测试与类型检查对本改动没有判别力 —— 如实记录为「不适用」,不凑一份看起来像验证过的输出。真正有判别力的是上面三道文档门禁 + 反向引用核查。本 PR 走哪条路
只改 AGENTS.md(仓库流程文档),不发布任何包 ⇒ 按
pr-automation.yml的处方走路线 2:skip-changeset标签,不带 changeset。路线 3(空 frontmatter changeset)已于 #5471 / PR #6059 关闭,本 PR 不做它的第一个反例。不在本 PR 里
content/docs/releases/、未动.claude/**(SKILL.md 只读引用,未编辑)。git show --stat= 1 file changed。Generated by Claude Code