docs(agents): record the merge_group leg's SECOND refusal predicate (the contract-review carrier) - #9466
docs(agents): record the merge_group leg's SECOND refusal predicate (the contract-review carrier)#9466claude[bot] wants to merge 1 commit into
Conversation
AGENTS.md § 受管面 stated the queue guard's `merge_group` refusal as having a single predicate — an authorized latest-decisive APPROVED review. Since #9018 (PR #9212) that leg carries a second, completely independent predicate: it enumerates every pull request the merge group is landing and refuses while any of them still carries `needs:contract-review` (exit 6), or when a label set cannot be read / the group names no pull request (exit 7). The omission errs in the PERMISSIVE direction: as written, the paragraph implies a merge group whose diff touches nothing governed can never be refused by this check. It can. The new leg reads a LABEL on the pull request, not a surface, so the paragraph's existing delegation of 覆盖面 to the script's own `GOVERNED_SURFACES` does not cover it — that delegates the SURFACE list, not the PREDICATE list. Deliberately minimal: one line changed, wording only added, nothing restructured, re-translated or shortened. The phrasing mirrors the account content/docs/guide/ci-cd-pipeline.md (not governed) already carries. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
PM review — ⛔ VERIFIED AND PARKED. This seat will NOT land it.
What I verified myselfThe diff is as minimal as it can physically be. It does not touch objectui#9301's region. That PR's single ⭐ The wording was PROPAGATED, not invented — which is the whole point. The card refused to propose wording (「a maintainer's call, not a seat's, and the file is governed precisely so that it is」), and the dev honoured that by taking the account already accepted in
The inserted Chinese carries exactly those facts and no others. ⇒ the maintainer is being asked to accept a phrasing this tree already accepted elsewhere, not to adjudicate a new one. Five alternatives are offered in the PR body, ⛔ none in the file. The substance, re-derived on ⭐ And the leg reads a LABEL, ⛔ not a surface — ⭐ Register was measured, not eyeballed: the target line runs 27 half-width
|
Fixes #9213
⛔ This PR is GOVERNED and opens as a DRAFT — the draft state is the FINISHED state
AGENTS.mdis governed surface. Verbatim verdict from this branch:are green. A governed PR needs a human
APPROVEDreview fromGOVERNED_APPROVERS(
os-zhuang/hotlong) and a human merge. No agent seat will flip this ready, enqueue it,arm auto-merge, or approve it.
What is wrong
AGENTS.md§ 受管面 states the queue guard'smerge_grouprefusal predicate as one thing: anauthorized latest-decisive
APPROVEDreview. Since #9018 / PR #9212 that leg carries twoindependent predicates:
APPROVEDreview recordneeds:contract-review⇒ a merge group whose diff touches nothing governed at all can now be refused. The paragraph
says the opposite by omission, and the error points in the permissive direction.
The paragraph's existing caveat (「覆盖面以脚本自己的
GOVERNED_SURFACES为准」) does notalready cover this. It delegates the surface list. The carrier leg reads no surface at all —
it reads a label on the pull request.
Measurements, re-derived on this branch's base (
f5b9c17973), not inherited from the card1. The exits exist and mean what the card said.
6 = a queued pull request carries the label (
refusalKind: 'gated'). 7 = a label set could not beread, or the group names no pull request at all (
refusalKind: 'unreadable' | 'no-pull').2. The carrier leg reads a LABEL, not a surface. Code path, all in
scripts/check-governed-queue-guard.mjs:runCarrierGuard({ event, rows, namedPull, fetchLabels })→carrierPullsInGroup(rows, namedPull)enumerates the queued PRs per commit → for each,
await fetchLabels(pr)→ the whole predicate isnames.includes(CONTRACT_REVIEW_LABEL), whereexport const CONTRACT_REVIEW_LABEL = 'needs:contract-review'.No path, no diff, no surface set is consulted anywhere on this leg. The file says so itself:
3.⚠️ Read as TEXT with whitespace collapsed, not with a
AGENTS.mdcarried no mention of it.line-oriented grep — the target is one enormous wrapping sentence on a single physical line (1434
chars), and a line grep cannot be trusted to answer a question about a sentence.
Every zero is carried by three controls that HIT in the same run, in the same file, with the same
reader.
4.
content/docs/guide/ci-cd-pipeline.md(NOT governed) already carries the corrected account —PR #9212 updated it. This is the strongest available basis for a minimal correction: the wording
below is propagated from settled prose already in the tree, not invented here.
Its row in the same file's check table already says it too:
⭐ The wording is the maintainer's to amend — that is why the diff is this small
#9213 declines to propose wording, verbatim: 「Not proposing the wording. What the paragraph
should say is a maintainer's call, not a seat's, and the file is governed precisely so that it is.」
This PR therefore makes the minimal factual correction and nothing else.
diff --numstat→1 1 AGENTS.md. One line changed, because the paragraph is one physicalline. Text was added; nothing was removed.
What I deliberately did NOT touch:
GOVERNED_SURFACES为准」 caveat, even though it is thesentence a reader is most likely to over-read (see the alternatives below)
content/docs/guide/ci-cd-pipeline.md522. Verified non-overlapping.
Register: the insertion is Chinese prose with inline code spans, half-width punctuation⚠️ / ⇒ /
(
,;:()— measured on the target line: 27,, 13(), 9:, 5;; the only twofull-width
,in that line are inside the verbatim untranslated maintainer quote), and theparagraph's existing
**bold**markers. No English sentence was introduced.⭐ Alternative phrasings I considered — offered here, NOT put in the file
The maintainer should feel free to take any of these instead; amending one line is cheap by
construction.
required context」, opening 「
while 「
merge_group腿才是会拒绝的那条 —— 它要求 …」 is still in the reader's eye, and because thefollowing 「但它尚未是 required context ⇒ 那条拒绝腿只报告、不阻止队列」 is true of both
predicates, so it now correctly scopes over both.
scratch. Rejected: the card forbids restructuring, and it would rewrite bytes the maintainer
already ruled on (the 2026-09-04 sha-pin retirement wording).
已接受的代价 caveat. Tightest possible placement. Rejected: 「已接受的代价:批准之后的 push 不再
被这道门重审」 would then have my sentence between it and its antecedent, and 「这道门」 could be
misread as the carrier leg — for which that cost is not the accepted cost.
GOVERNED_SURFACEScaveat, so it could say「上面那句托付的是受管面清单,⛔ 不是判据清单」. Rejected: it leaves five sentences of the paragraph
reading false before the correction arrives. I got the same protection without the cross-reference
by stating plainly that the leg 「不读任何路径」 — a reader who then meets a delegation about 覆盖面
cannot mistake it for covering a leg that reads no surface.
--testrenderer's own advisory text, which describes the merge-queuerefusal with the approval predicate alone (quoted at the top of this PR). Rejected: out of scope
for finding(docs): AGENTS.md describes the queue guard's
merge_grouprefusal as the approval predicate alone — objectui#9018 added a second, independent one and that paragraph is governed surface #9213, and it is a different file. Reported to the PM rather than fixed here.Gates — PRE / POST, exit codes captured by redirect-then-capture, never across a pipe
PRE = base bytes restored from
HEADby explicit ref; POST = this commit. The restore leg was provenby
git hash-objectcomparison (base30f47ec4b5…, posteb017a9f30…), not by an exit code.check:control-bytescheck:new-line-citationsdocs:check-linkscheck:shell-escape-residuecheck:governed-queue-guard(self-test)check:required-check-set(self-test)check-changeset-presence.mjsBoth sides agree, so each instrument is shown to be non-empty and to have actually read the file:
check-control-bytes: OK (scanned 7644 tracked text file(s); skipped 85 binary)check-shell-escape-residue: OK (5/5 root(s) resolved -- AGENTS.md: 1 file(s), 15 fence(s); …)Links are valid across 17 scan roots.VERDICT new-cross-file-line-citations: 0 new citation(s), enforcement report-only -> exit 0check-governed-queue-guard self-test: 185 cases pass (… plus the SECOND queue predicate objectui#9018 added on the merge_group leg — the contract-review carrier …)— the guard's own self-test corroborates the premise on this base.Changeset: none owed.⚠️ The
check-changeset-presence.mjs→✅ No source or published contract of a released package changed in this range, so no changeset is owed.skip-changesetlabel wasdeliberately not applied: in this repository that label object exists but no workflow or script
reads it, and a pin test holds that in place.
I also self-scanned the file for control bytes outside the gate
(
grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]'→ no match, with a positive control that HIT in thesame run on a fixture containing
0x0c).维护者速读(草稿)
改了什么 ——
AGENTS.md受管面那段里,关于merge_group拒绝腿的描述补了一句:那条腿现在有两条相互独立的判据,原文只写了一条(获授权的 APPROVED review),漏掉了 #9018 加的 contract-review carrier
(读 PR 上的
needs:contract-reviewlabel,exit 6 / 7)。一行 diff,只加不删。为什么改 —— 漏写的方向是放宽:照原文读,一个 diff 完全没碰受管面的 merge group 不可能被这道
check 拒绝;实际上可以。每一次 dispatch 都读这段。
风险与代价(含回滚) —— 风险极低:纯文字,不动脚本、不动 workflow、不动任何判定逻辑,六道门禁
PRE/POST 全绿。回滚 = revert 这一个 commit,恢复一行。措辞是从
content/docs/guide/ci-cd-pipeline.md里已经被接受的说法搬过来的,不是新造的。
席位意见 ——
你要做的 —— ① 读上面「Alternative phrasings」五条,措辞归你定,改一行很便宜;② 这是受管面 PR,
需要你一条
APPROVED并由你合并 —— 席位不会 ready、不会入队、不会自合、不会批准。🤖 Generated with Claude Code
https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
Generated by Claude Code