Skip to content

Commit 1f35f8d

Browse files
committed
chore(pm): queue guard hints follow PD14 dequeue; record the live pr_dequeue reading
The queue guard's two refusal remedies and their pins now say what AGENTS.md Prime Directive #14 says: a queued pull request's 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. platform-readings.md records the measured stroke (fleet-write run 43767458575) and landing-operations.md points the landing seat at it, both paid in-file. Refs #33768 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfVcrqPWPvsYbkg1XX
1 parent ec6b5fd commit 1f35f8d

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)