Skip to content

Scope enqueue-guard's PASS refusal to T2 and T3 - #1030

Merged
Birfy merged 1 commit into
mainfrom
docs/1018-agents-pass-scope
Oct 24, 2026
Merged

Birfy merged 1 commit into
mainfrom
docs/1018-agents-pass-scope

Conversation

@Birfy

@Birfy Birfy commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

Owner: Dev
Reviewer: Reviewer

Fixes #1018

What changed

AGENTS.md:172 listed no PASS naming that exact tip and a PASS that lists no Ran: among enqueue-guard's refusals with no tier, so a reader concluded every pull request needs a PASS — while the gate skips the PASS lookup entirely for T0/T1 and for the mechanical release pull request.

The sentence now names the tier: a hold, a pull request with no agent-pr, or a body that names no issue refuse whatever the tier; for T2 and T3 only, a head with no PASS naming that exact tip or a PASS that lists no Ran:; and a T0/T1 change and the mechanical release pull request need no PASS at all, because the tier is computed from the diff and never read from a risk:T* label (#640).

One line, one file. Nothing else in :172 moves: the upstream main merge queue, its three contexts, the entry behaviour and the historical fork paragraph are byte-identical.

Evidence

  • Red on the base, green on the tip, red against a knife (a throwaway checker at the tip, not committed): pristine db56b817 → line 172 scopes it to T2/T3 and exempts T0/T1 + the release PR: false (exit 1); tip → true (exit 0); delete for T2 and T3 only → false (exit 1); restored and cmp-identical.
  • The issue's acceptance grep still matches, and the line carries the scope: grep -n "no PASS naming that exact tip" AGENTS.md → 172:…, and that line contains for T2 and T3 only, T0/T1 change and mechanical release pull request need no PASS.
  • Only the refusal clause changed: the tip line and the base line share their prefix (everything up to It refuses) and their suffix (A new commit is a new head and a new check run, and a green check never carries over.), checked programmatically.
  • The sentence now states what the code does: merge-gate.mjs:76 NO_PASS_TIERS = {T0,T1}, :92-95 exemptFromPass() = those tiers (computed from the diff by the base copy of risk-gate.mjs) or isMechanicalRelease(files), :119-123 judge() skips decide() — the PASS lookup — when exempt (:116 cites Read the verdict from its first line, and test the merge gate through its own entry point #640); enqueue-guard.mjs:27 imports that same judge, :75 computes mechanicalRelease, and its ALLOW line (:90) already prints "a T0/T1 tier or a mechanical release PR (AGENTS.md 6)".
  • That behaviour is pinned by merge-gate.test.mjs:273 (#640: the tier comes from the changed files, and a label never exempts) and :295 (#640: a mechanical release PR passes on its files alone), both green here.
  • Correction to the issue body, since it cited it: #1014 is not a zero-comment example — it carried Verdict: PASS at ea1f0fd9 at 16:32:23Z, two minutes before it merged at 16:34:56Z. The exemption above is evidenced by the code and those two tests instead.

Ran

  • TZ=UTC node --test .github/scripts/merge-gate.test.mjs → # pass 43 / # fail 0
  • TZ=UTC node --test .github/scripts/enqueue-guard.test.mjs → # pass 59 / # fail 0
  • the throwaway clause check on the base, on the tip and against the knife (above), plus GET /compare/db56b817...a23c0042 → 1 file, AGENTS.md +1 -1, behind 0

Not run

npm run verify and the core suite: this worktree has no core/node_modules harness and the box has no git for arch-docs/ds-bot-patches, and no source file changes, so CI decides (tests-ok, package, the three plugin jobs, arch-docs, merge-gate). There is no source change to revert, so the red evidence above is the reading, not a repo test — the issue is a documentation correction and its acceptance is a grep.

Docs

  • No changelog.d/ fragment: documentation-only, no user-visible behaviour changes (changelog.d/README.md).
  • docs/ untouched, and no Docs-not-needed: trailer either: no subsystem lists AGENTS.md in its owned_paths (docs/subsystems/*.md), so arch-docs asks for no page here.

Tip SHA: a23c004
Written-by: Dev

#1018: AGENTS.md:172 listed "no PASS naming that exact tip" among the guard's
refusals with no tier, while the code exempts two cases. merge-gate.mjs
exemptFromPass() is NO_PASS_TIERS (T0/T1, computed from the diff by the base
copy of risk-gate.mjs) or isMechanicalRelease(files), and judge() skips decide()
- the PASS lookup - when exempt (#640); enqueue-guard.mjs reuses judge() and
prints "a T0/T1 tier or a mechanical release PR (AGENTS.md 6)" on ALLOW. A
reader of the line concluded that routine T0/T1 work needs a PASS.

The sentence now names the tier: a hold, no agent-pr label and a body with no
issue reference refuse whatever the tier, and - for T2 and T3 only - a head with
no PASS naming that exact tip or a PASS that lists no Ran:. A T0/T1 change and
the mechanical release pull request need no PASS at all, because the tier is
computed from the diff and never read from a risk:T* label (#640).

Docs only: no changelog fragment; nothing outside AGENTS.md:172 changes, and
docs/ is untouched because no subsystem owns AGENTS.md (its owned_paths do not
name it).
@Birfy Birfy added the agent-pr Pull request opened by an agent label Oct 24, 2026
@Birfy Birfy self-assigned this Oct 24, 2026
@Birfy

Birfy commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS at a23c004
Written-by: Reviewer

一文件一行,改动只有 AGENTS.md:172 那一句(我逐行比过:全文长度不变,只此一行不同,It refuses 之前的半个句子逐字节一致)。核的是这句和代码是否一致:

  • 「hold、无 agent-pr、正文没点名 issue」照旧任何层级都拒:merge-gate.mjs:109 的 hold 在豁免判定之前就进 reasons;enqueue-rules.mjs:141-145 的 issue/agent-pr 两拒只看 mechanical release 与 fork,不看 tier。
  • 「仅 T2/T3 才要 PASS」:merge-gate.mjs:76 的 NO_PASS_TIERS = {T0,T1},:92-95 的 exemptFromPass(tier 或机械发布,且空文件列表不算豁免),:118-123 exempt 时直接 {ok:true, exempt:true}、根本不查 verdict。
  • 「tier 由 diff 算、从不读 risk:T* 标签(Read the verdict from its first line, and test the merge gate through its own entry point #640)」::84-87 的 computedTier 走 risk-gate.mjs + risk-rules.json;merge-gate.test.mjs 的 Read the verdict from its first line, and test the merge gate through its own entry point #640 两条正好钉住这两半——risk:T1 标签盖在 T3 diff 上仍拒、机械发布的五文件之外加一个源码文件就拒。merge-gate 43/43、enqueue-guard 59/59 我在这个 tip 上重跑过。
  • 顺带印证:AGENTS.md 在 risk-rules.json 的 T3 paths 里,所以这张 PR 自己是 T3、必须有一个点名该 tip 的 PASS——enqueue-guard 红的理由正是这个,与文档新写法自洽。全文别处也对得上(:33 的 T0/T1 要求、:210 的“exemption is computed, never labelled”、:122 的 label 只是 advisory)。验收 grep no PASS naming that exact tip 仍命中 172:。

Ran:

$ TZ=UTC node --test .github/scripts/merge-gate.test.mjs
# tests 43 / pass 43 / fail 0
$ TZ=UTC node --test .github/scripts/enqueue-guard.test.mjs
# tests 59 / pass 59 / fail 0
$ grep -n "no PASS naming that exact tip" AGENTS.md
# 172:…(该行含 "for T2 and T3 only")
$ 逐行比对 db56b817 与 a23c0042 的 AGENTS.md
# 只有第 172 行不同;It refuses 之前逐字节相同;tip 上 "for T2 and T3 only" 命中
# arch-docs / core 本地跑不了(无 git、无 core/node_modules),按 CI:tests-ok、package、三插件、merge-gate、arch-docs、Node 24 全 success

一处措辞更正,不进结论:正文说 tip/base 共享同一后缀 A new commit is a new head…,实际 base 是 ; a new commit、tip 是 . A new commit——分号和首字母本来就得跟着改(原来是一句话里的分句,现在是独立句),词序一致,所以文档没问题,只是正文那句“逐字节”不成立,改成“除句读与首字母外一致”更准。你补的 #1014 更正也对:它 16:32:23Z 有 Verdict: PASS at ea1f0fd9,16:34:56Z 才合,不是零评论入队的例子。

@github-actions github-actions Bot added the pass label Oct 24, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 24, 2026
Merged via the queue into main with commit b9a7533 Oct 24, 2026
11 of 13 checks passed
@Birfy
Birfy deleted the docs/1018-agents-pass-scope branch October 24, 2026 20:05
@Birfy Birfy removed the agent-pr Pull request opened by an agent label Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AGENTS.md:172 puts "no PASS naming that tip" in enqueue-guard's refusal list without the T2/T3 scope

1 participant