Skip to content

Commit f4a2d14

Browse files
chore(pm): queue guard refusal hints follow PD14 dequeue; record the live pr_dequeue reading (#34559)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBTFATNfMJ3wCadH4nywTxtZ)_ Part of #33768 Clause-②: no Metadata-protocol: none ## 维护者速读 - **改了什么**:队列守卫两条拒收提示(受管面、超行数)的第一步改为:在队 PR 由其落地席发中继 `pr_dequeue`,其他席位或该笔未落地才请维护者手动移出;自测钉子同步。`platform-readings.md` 记一行实测出队读数,`landing-operations.md` 一行指给落地席。 - **为什么改**:AGENTS.md 第 14 条(已落地)写明落地席可发 `pr_dequeue`,守卫提示仍说「没有席位动作能出队」,把每个席位都送去找维护者,与规则相反。 - **风险与回滚**:只改提示文字、注释与自测钉子,判定逻辑不动;回滚 = revert 本 PR 一个提交。 - **先看**:`scripts/pm/check-governed-queue-guard.mjs` 1990–1999 与 2959–2968(两条提示正文)、5162–5205(钉子)。 - **两分钟验证**:`node scripts/pm/check-governed-queue-guard.mjs --self-test` → 581 cases pass。 - **需要你做的**:批准本 PR(Tier H:守卫是受管面自身的门)。 ### AGENTS.md Prime Directive #14, as landed (merge `3bf9c5c4`), quoted verbatim > **Already armed or queued when you read this?** Disable auto-merge AND convert it back to **draft**, which disarms > an unqueued PR; a queued one's landing seat sends the relay's `pr_dequeue` (measured live, comment 6902190812); any > other seat, or a stroke that does not land, asks the maintainer at once — then confirm from the remote that it is > in neither the queue nor `origin/main`. ## What changes **Box A: the queue guard's refusal remedies follow PD14.** `renderGuardVerdict` and `renderSizeVerdict` step 1 now say: disabling auto-merge and converting to DRAFT do not take a queued PR out of the queue; its landing seat sends the relay's `pr_dequeue` AT ONCE (measured live, comment 6902190812); any other seat, or a stroke that does not land, asks the maintainer AT ONCE to remove it by hand; then disarm and confirm from the remote. The old text ("no seat act is measured to take it out of the queue") is gone. No new rule: the wording is PD14's. Comments and pins kept in step: - the remedy-order pin's first position is now `its landing seat sends the relay's \`pr_dequeue\` AT ONCE` (was `ask the maintainer AT ONCE`); its assert name drops `MAINTAINER-`; - the queued pull-back battery's header comment, its `QUEUED_PULL_BACK` pins (the old "no seat act" and "ask the maintainer" pins replaced by three: not-out-of-the-queue, landing seat's `pr_dequeue`, any-other-seat asks the maintainer), its assert name and its battery name (`…: the landing seat sends the relay dequeue, never a DRAFT conversion`; the roster row renamed with it, count stays 4); - the self-test's closing summary sentence. The DRAFT-dequeue detector and its fixtures are untouched: a draft conversion still does not dequeue. **Box B: the measured live dequeue.** - `platform-readings.md`, queue membership: new row `中继 \`pr_dequeue\` 实测出队(run 43767458575,审计 6902190812):mutation 200,回读离队,仍开未合。` Read off the run's job log: `pr_dequeue: POST /graphql dequeuePullRequest -> HTTP 200 · #34097 out of the merge queue and still open, unmerged · read back 25 entr(ies), none is #34097 · audit comment 6902190812`. - `landing-operations.md`, right after the dequeue cause lines: `该 op 实测离队见 \`platform-readings.md\`;在队受管面 PR 亦由落地席发(Prime Directive #14)。` Paid in-family, both files stay at their ceilings (458, 112): - `platform-readings.md`: the two lines "不在 `origin/main` 上是二义读数…两者处置相反" and "⇒ 落地检查恒两个读数…缺一不可" merged into one: `不在 \`origin/main\` 二义(在队等/没入队)⇒ 落地检查恒读两数:队列成员资格与 \`origin/main\`。` Cut: "两者处置相反" and "缺一不可", both carried by "恒读两数". - `landing-operations.md` §D: "两棒散文互锁时分工由 PM 指派,允许前棒留占位交接。" and "PM 必须在两侧接力指令里写明谁动、谁不动。" merged: `…允许前棒留占位交接;PM 在两侧指令写明谁动、谁不动。` Cut: "必须", "接力". ## Tests - `node scripts/pm/check-governed-queue-guard.mjs --self-test`: 581 cases pass (581 at base; the battery's assertion count is unchanged). - Ablation (scratch copy, restored): changing the size remedy's "So its landing seat sends" back to an ask-the-maintainer opening → `✗ ⭐ every-size-refusal-kind-carries-the-SAME-pull-back`, 1 of 581 failed. ## Acceptance notes - Tier H: `scripts/pm/check-governed-queue-guard.mjs` is the governed surface's own gate. `skip-changeset` (no published file). - Card boxes for the seat to tick: the two "Follower of PR #34256" boxes. N1, E1, D2, D4, N2 stay open. - E1 (removal-to-merge gap) is still not measured: the run log carries no merge, the PR was dequeued and stayed open. ## Verification Head `1f35f8d4` on base `ec6b5fd3`: - `node scripts/pm/dispatch-gates.mjs --commands` derived 70; 68 exit 0; 2 exit 3 (PREREQUISITE NOT MEASURED, left to CI): `pnpm --filter @objectstack/lint run check:doc-formula-expressions` (`@objectstack/formula` not built) and `pnpm check:i18n-coverage` (CLI not built). Neither reads the three files here. - `--ran`: 70 derived, 68 run, 2 NOT-MEASURED, 0 UNRUN, exit 0. - Among the 68: `check-governed-queue-guard --self-test` (581 pass), `pnpm check:pm-skill-ratchet` (platform-readings 458/458, landing-operations 112/112), `pnpm check:pm-skill-id-lint` (118 files clean), `check:pm-governed-prose`, `check:scripts-symbol-anchors`, `check:nul-bytes`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01WGufzfVcrqPWPvsYbkg1XX Co-authored-by: Claude <noreply@anthropic.com>
1 parent ffa6db1 commit f4a2d14

3 files changed

Lines changed: 40 additions & 32 deletions

File tree

‎.claude/skills/pm-dispatch/references/landing-operations.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
- 逾 3,000 行须授权批准在现 head,或维护者非席位签名评论点名现 head 承接(`approval_comment`)。
3636
- 出队(中继 `pr_dequeue`)限三因:(a) 与基座冲突;(b) 自身改动致队列构建红,三事实判非 flake;
3737
(c) PR 正文签名尾行之席以签名评论自请。审计评论在先,回读离队且仍开未合才落地。
38+
- 该 op 实测离队见 `platform-readings.md`;在队受管面 PR 亦由落地席发(Prime Directive #14)。
3839
- 谁入队谁看护:冲突或自因被踢 ⇒ 一轮巡查内出队修复再入队;他人 flake 照四分支重投。
3940
- PR 侧红(非队列)同在本窗口处置:义务与三步只住 `platform-readings.md`「红检查先读日志」。
4041
- 挂 auto-merge/入队前读 K = `git rev-list --count --first-parent PRBASE..origin/main`。
@@ -108,5 +109,4 @@
108109
- 相邻两棒同碰一个文件时,交接的是语义不是文本。
109110
- 前棒在回报里写明它对共享文件改动的性质:改名、提取变量、增补断言,还是纯追加。
110111
- PM 原样转告下一棒,并要求两个 PR 的意图叠加,⛔ 禁止机械取一边。
111-
- 两棒散文互锁时分工由 PM 指派,允许前棒留占位交接。
112-
- PM 必须在两侧接力指令里写明谁动、谁不动。
112+
- 两棒散文互锁时分工由 PM 指派,允许前棒留占位交接;PM 在两侧指令写明谁动、谁不动。

‎.claude/skills/pm-dispatch/references/platform-readings.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
- 推送重折已挂 auto-merge 的 PR 可静默掉挂,无字段说明 ⇒ 重折后重发,再按队列 ref 探。
1616
- 成功序列读伴随不读次序:`removed_from_merge_queue` 与 `merged` 同秒或数秒内到,次序实测不定。
1717
- 真被踢是其后无 `merged`、几分钟后 PR 仍 open;两种退出的 actor 同为 `github-merge-queue[bot]`。
18-
- 不在 `origin/main` 上是二义读数:在队列里等 / 没入队,两者处置相反。
19-
- ⇒ 落地检查恒两个读数:队列成员资格 和 `origin/main`,缺一不可。
18+
- 不在 `origin/main` 二义(在队等/没入队)⇒ 落地检查恒读两数:队列成员资格与 `origin/main`。
2019
- `origin/main` 按内容读(grep 本 PR 的产物),⛔ 不按 head sha 祖先性、不按 `merged` 布尔。
2120
- 队列落的是另一个提交:`git merge-base --is-ancestor <pr-head> origin/main` 对已完全合入的 PR 答 NO。
2221
- 同 PR 的 `list_pull_requests` 会回 `merged: false` 与 `merged_at` 并存 ⇒ 只读布尔即读成没合。
@@ -41,6 +40,7 @@
4140
- 本仓转 draft 同秒掉 auto-merge 仅见于未入队时,转正后重挂;已入队者 2026-08-08、09-29 照合。
4241
- 补救:转 draft 与卸载 auto-merge 都做,卸载单独不踢队;两手齐做未见踢队(08-08、09-28、10-24)。
4342
- 出队按队列 ref 阳性探针答不在队向,加未落地;ref 缺席只作旁证,⛔ 永不承载结论。
43+
- 中继 `pr_dequeue` 实测出队(run 43767458575,审计 6902190812):mutation 200,回读离队,仍开未合。
4444
- `update_pull_request` 单字段调用也发送 `draft` 位,曾把治理面 draft 发进队列 ⇒ 锁 1 已拒。
4545
- 请审专用路 = REST `POST /pulls/{n}/requested_reviewers`,载荷只有 reviewers/team_reviewers。
4646
- 它不碰 draft 位 ⇒ 请审恒走它;MCP 兜底已拒。

‎scripts/pm/check-governed-queue-guard.mjs‎

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ const SELF_TEST_BATTERIES = Object.freeze({
695695
'⭐ #18701: the record lives on the PR or its card, and BOTH are read': 14,
696696
'⛔ #19036: the SIZE line at the queue — imported, per queued PR, fail-closed': 54,
697697
'⭐ #19344: the remedy names a path the ruleset actually offers': 5,
698-
'⛔ the queued pull-back: the remedy names no dequeue act a seat has': 4,
698+
'⛔ the queued pull-back: the landing seat sends the relay dequeue, never a DRAFT conversion': 4,
699699
'⭐ the 2026-09-20 ruling: a certified PURE REGENERATION carries the record to the queued head': 13,
700700
'the per-row repository scope (ruling B2, 2026-10-13)': 14,
701701
'⭐ B′ with C: the record stands at the tier its FACE maps to, read off the committed paths': 8,
@@ -1987,12 +1987,14 @@ export function renderGuardVerdict(verdict) {
19871987
lines.push(
19881988
'',
19891989
' What satisfies this check:',
1990-
' 1. ⭐ FIRST, whatever comes after it — the pull request is IN the queue, and no seat act is measured',
1991-
' to take it out of the queue, disabling auto-merge and converting it to DRAFT included',
1990+
' 1. ⭐ FIRST, whatever comes after it — the pull request is IN the queue, and disabling auto-merge',
1991+
' and converting it to DRAFT do not take it out of the queue',
19921992
' (`.claude/skills/pm-dispatch/references/platform-readings.md`, queue membership).',
1993-
' So ask the maintainer AT ONCE to remove it from the queue by hand; disable auto-merge AND convert',
1994-
' it back to DRAFT, which disarms it so it does not re-enter once removed; then confirm from the',
1995-
' remote that it is in neither the queue nor `origin/main` (AGENTS.md Prime Directive #14). Out of',
1993+
' So its landing seat sends the relay\'s `pr_dequeue` AT ONCE (measured live, comment 6902190812);',
1994+
' any other seat, or a stroke that does not land, asks the maintainer AT ONCE to remove it by hand.',
1995+
' Disable auto-merge AND convert it back to DRAFT, which disarms it so it does not re-enter once',
1996+
' removed; then confirm from the remote that it is in neither the queue nor `origin/main`',
1997+
' (AGENTS.md Prime Directive #14). Out of',
19961998
' the queue and in draft is where a governed PR waits — 「四件套留 draft 等人批,⛔ 不翻正式不入队」',
19971999
' — the SAFE state, not a stalled one.',
19982000
` 2. Then: obtain an APPROVED review by an authorized approver (GOVERNED_APPROVERS: ${GOVERNED_APPROVERS.join(', ')})`,
@@ -2954,12 +2956,14 @@ export function renderSizeVerdict(verdict) {
29542956
lines.push(
29552957
'',
29562958
' What satisfies this check:',
2957-
' 1. ⭐ The pull request is IN the queue, and no seat act is measured to take it out of the queue,',
2958-
' disabling auto-merge and converting it to DRAFT included',
2959+
' 1. ⭐ The pull request is IN the queue, and disabling auto-merge and converting it to DRAFT do not',
2960+
' take it out of the queue',
29592961
' (`.claude/skills/pm-dispatch/references/platform-readings.md`, queue membership).',
2960-
' So ask the maintainer AT ONCE to remove it from the queue by hand; disable auto-merge AND convert',
2961-
' it back to DRAFT, which disarms it so it does not re-enter once removed; then confirm from the',
2962-
' remote that it is in neither the queue nor `origin/main` — the pull-back of AGENTS.md Prime',
2962+
' So its landing seat sends the relay\'s `pr_dequeue` AT ONCE (measured live, comment 6902190812);',
2963+
' any other seat, or a stroke that does not land, asks the maintainer AT ONCE to remove it by hand.',
2964+
' Disable auto-merge AND convert it back to DRAFT, which disarms it so it does not re-enter once',
2965+
' removed; then confirm from the remote that it is in neither the queue nor `origin/main` — the',
2966+
' pull-back of AGENTS.md Prime',
29632967
' Directive #14. Out of the queue and in draft is the SAFE state.',
29642968
' 2. Then ONE of the landings — the same terminal a Tier H governed diff has: ACCEPT on the card,',
29652969
' `pm:awaiting-merge` on the PR, a final 维护者速读, review requested from GOVERNED_APPROVERS',
@@ -4276,16 +4280,17 @@ export async function selfTest() {
42764280
assert('a-refusal-names-the-pull-request', refusalText.includes('#9527'), refusalText);
42774281
assert('a-refusal-states-what-would-satisfy-it', /What satisfies this check/.test(refusalText) && /DRAFT/.test(refusalText) && /APPROVED review/.test(refusalText), refusalText);
42784282
// ⭐ The remedy is an ORDER, not a menu, and the order is the landed rule's:
4279-
// the queued pull request goes back to the maintainer's manual removal first
4280-
// (AGENTS.md Prime Directive #14 — no seat act is measured to dequeue it),
4283+
// the queued pull request comes out of the queue first (AGENTS.md Prime
4284+
// Directive #14 — its landing seat sends the relay's `pr_dequeue`, any other
4285+
// seat asks the maintainer),
42814286
// then the authorized approval, then the claiming seat lands it (ruling C,
42824287
// #17971). The pin reads all three positions rather than the first two,
42834288
// because a remedy that stopped at the approval would leave a seat waiting
42844289
// for a merge nobody is going to perform; and each position must EXIST, since
42854290
// a phrase that is gone answers -1, which sorts before everything.
4286-
const remedyOrder = ['ask the maintainer AT ONCE', 'obtain an APPROVED review', 'CLAIMING SEAT lands it from there'].map((p) => refusalText.indexOf(p));
4291+
const remedyOrder = ['its landing seat sends the relay\'s `pr_dequeue` AT ONCE', 'obtain an APPROVED review', 'CLAIMING SEAT lands it from there'].map((p) => refusalText.indexOf(p));
42874292
assert(
4288-
'a-refusal-orders-the-remedy-the-MAINTAINER-PULL-BACK-then-the-authorized-APPROVAL-then-the-CLAIMING-SEAT-lands-it',
4293+
'a-refusal-orders-the-remedy-the-PULL-BACK-then-the-authorized-APPROVAL-then-the-CLAIMING-SEAT-lands-it',
42894294
remedyOrder.every((i) => i !== -1) && remedyOrder[0] < remedyOrder[1] && remedyOrder[1] < remedyOrder[2],
42904295
`${JSON.stringify(remedyOrder)} :: ${refusalText}`,
42914296
);
@@ -5154,26 +5159,29 @@ export async function selfTest() {
51545159
assert('⭐ one-configured-bypass-actor-makes-the-named-path-REACHABLE-and-the-pin-clears', judgeRemedy(sizeRemedy, { bypass_actors: [{ actor_type: 'RepositoryRole', bypass_mode: 'pull_request' }] }).ok === true);
51555160
assert('⛔ and-a-remedy-drifting-back-to-a-bare-maintainer-click-REDS-even-where-the-path-IS-offered', judgeRemedy("the maintainer's own click lands it (人工直合).", { bypass_actors: [{ actor_id: 5 }] }).ok === false);
51565161

5157-
// ── the queued pull-back: the remedy names no dequeue act a seat has ─────
5162+
// ── the queued pull-back: the landing seat sends the relay dequeue, never a DRAFT conversion ─────
51585163
//
51595164
// Both refusals print on the merge_group leg, so the pull request they name
5160-
// IS in the queue. No seat act is measured to take a queued pull request out
5161-
// of it — a DRAFT conversion and an auto-merge disable included
5165+
// IS in the queue. A DRAFT conversion and an auto-merge disable do not take
5166+
// a queued pull request out of it
51625167
// (`.claude/skills/pm-dispatch/references/platform-readings.md`, queue
5163-
// membership) — so the remedy is AGENTS.md Prime Directive #14's pull-back:
5164-
// the maintainer's manual removal at once, the disarm so it does not
5165-
// re-enter, and a confirmation from the remote. A remedy that tells a seat
5168+
// membership), so the remedy is AGENTS.md Prime Directive #14's pull-back:
5169+
// the landing seat's relay `pr_dequeue` at once (measured live, comment
5170+
// 6902190812) or, from any other seat or on a stroke that does not land, the
5171+
// maintainer's manual removal at once; the disarm so it does not re-enter;
5172+
// and a confirmation from the remote. A remedy that tells a seat
51665173
// the draft conversion dequeues sends it away believing the PR is parked
51675174
// while the queue can still merge it.
51685175
//
51695176
// The texts are read FLATTENED: a phrase wrapped across two array entries
51705177
// is still one phrase to the reader, so it is one phrase to the pin.
5171-
battery('⛔ the queued pull-back: the remedy names no dequeue act a seat has');
5178+
battery('⛔ the queued pull-back: the landing seat sends the relay dequeue, never a DRAFT conversion');
51725179
const flatText = (t) => t.replace(/\s+/g, ' ');
51735180
const QUEUED_PULL_BACK = Object.freeze([
5174-
/no seat act is measured to take it out of the queue, disabling auto-merge and converting it to DRAFT included/,
5175-
/ask the maintainer AT ONCE to remove it from the queue by hand/,
5176-
/disable auto-merge AND convert it back to DRAFT, which disarms it/,
5181+
/disabling auto-merge and converting it to DRAFT do not take it out of the queue/,
5182+
/its landing seat sends the relay's `pr_dequeue` AT ONCE \(measured live, comment 6902190812\)/,
5183+
/any other seat, or a stroke that does not land, asks the maintainer AT ONCE to remove it by hand/,
5184+
/Disable auto-merge AND convert it back to DRAFT, which disarms it/,
51775185
/confirm from the remote that it is in neither the queue nor `origin\/main`/,
51785186
/AGENTS\.md Prime Directive #14/,
51795187
/platform-readings\.md`, queue membership/,
@@ -5192,7 +5200,7 @@ export async function selfTest() {
51925200
const governedRefusals = [refusedV, unreadableV, unattrV].map((v) => renderGuardVerdict(v));
51935201
const sizeRefusals = [overOne, unreadOne, sizeNoPull].map((v) => renderSizeVerdict(v));
51945202
assert(
5195-
'⭐ every-governed-refusal-kind-sends-the-queued-PR-to-the-MAINTAINERS-manual-removal-disarms-it-and-confirms-from-the-remote',
5203+
'⭐ every-governed-refusal-kind-sends-the-queued-PR-to-the-LANDING-SEATS-relay-dequeue-or-the-MAINTAINERS-manual-removal-disarms-it-and-confirms-from-the-remote',
51965204
governedRefusals.every((t) => /REFUSED/.test(t) && missingPullBack(t).length === 0),
51975205
JSON.stringify(governedRefusals.map(missingPullBack)),
51985206
);
@@ -6903,8 +6911,8 @@ export async function selfTest() {
69036911
'every combination — and the #19344 remedy pin: every limb names the Merge button\'s bypass-rules option, ' +
69046912
'judged against the recorded ruleset reading, red on a present-and-empty `bypass_actors` and on a remedy ' +
69056913
'drifting back to a bare click, and passing with the reading PRINTED when the field is unreadable — and the ' +
6906-
'queued pull-back: every refusal kind on both legs sends the queued pull request to the maintainer\'s manual ' +
6907-
'removal, disarms it and confirms from the remote, and no rendering claims a DRAFT conversion dequeues it, ' +
6914+
'queued pull-back: every refusal kind on both legs sends the queued pull request to its landing seat\'s relay ' +
6915+
'`pr_dequeue` or, from any other seat, the maintainer\'s manual removal, disarms it and confirms from the remote, and no rendering claims a DRAFT conversion dequeues it, ' +
69086916
'with a detector control that fires on every listed spelling — and the 2026-10-26 ENQUEUE leg: an entry an ' +
69096917
'account in GOVERNED_APPROVERS put in the queue clears with no APPROVED review and lifts the size limb through ' +
69106918
'the sibling, a seat enqueue still refuses, an UNDETERMINED enqueuer (no add, a removal newest, an unreadable or ' +

0 commit comments

Comments
 (0)