Repository navigation
Commit da93a8b
fix(pm): the queue guard's refusal remedies send a queued PR to the maintainer's manual removal, never claiming a DRAFT conversion dequeues it (#20894)
Fixes #20855
Clause-②: no
## What changed
`scripts/pm/check-governed-queue-guard.mjs` prints two refusal remedies:
the governed-surface leg's (`renderGuardVerdict`) and the SIZE leg's
(`renderSizeVerdict`). Both refusals fire only on the `merge_group` leg
(`guardVerdict` returns `warned` and `sizeGuardVerdict` returns
`not-applicable` on `pull_request`), so the pull request they name IS in
the queue. Both told a seat to "take the pull request out of the queue:
convert it back to DRAFT (disarming auto-merge alone does NOT dequeue
it) and park it there". No seat act is measured to dequeue a queued pull
request, and that includes a draft conversion
(`.claude/skills/pm-dispatch/references/platform-readings.md`, queue
membership).
Step one of both remedies now says what AGENTS.md Prime Directive #14
has said since `2d5fe76f`:
- the pull request is in the queue, and no seat act is measured to take
it out, disabling auto-merge and converting it to DRAFT included;
- ask the maintainer AT ONCE to remove it from the queue by hand;
- disable auto-merge AND convert it back to DRAFT, which disarms it so
it does not re-enter once removed;
- confirm from the remote that it is in neither the queue nor
`origin/main`.
The rest of each remedy is unchanged: the approval route, both landings,
and the bypass-rules option. The quote 「四件套留 draft 等人批,⛔ 不翻正式不入队」 is
kept, now as the place a governed PR waits once it is out of the queue.
No dequeue act is named: no GraphQL mutation and no relay op. Only
printed text and its self-test move. No verdict, exit code or read
changes.
## The pins
- **Ordering pin (moved).** The governed remedy's ordering pin now
checks three positions in order: the pull-back (`ask the maintainer AT
ONCE`), then `obtain an APPROVED review`, then `CLAIMING SEAT lands it
from there`. It also refuses a missing phrase. The old pin compared raw
`indexOf` results, and a missing phrase answers -1, which sorts first.
- **New battery (floor 4).** `⛔ the queued pull-back: the remedy names
no dequeue act a seat has`; `SELF_TEST_BATTERY_FLOOR` goes from 23 to
24. The battery collapses whitespace in each text before reading it, so
a phrase wrapped across two array entries still counts as one. Its four
cases:
1. every governed refusal kind (unapproved, unreadable, unattributed)
carries the pull-back;
2. every size refusal kind (oversized, unreadable, no-pull) carries the
same pull-back;
3. a control: the draft-dequeue detector fires on each of four fixtures,
and every spelling it lists fires on at least one fixture;
4. the negative pin: no rendering (the six refusals and the
`pull_request`-leg warning) matches any spelling of "a DRAFT conversion
dequeues it".
- Self-test: 292 → 296 cases, all passing.
## Ablation (one-time; no permanent test file)
Both legs ran through `node scripts/ablation-replace.mjs` in WRAP mode,
from the committed head `7f89016f9`. Each leg ran inside a script with
an EXIT/INT/TERM restore trap on the absolute path.
- **Leg A: the old sentence restored.** The size remedy's new step one
was replaced by the sentence at `4edb61449`: anchor 1 → 0, blob
`3f59569d5403` → `8bd07044a078`, on-disk count of `alone does NOT
dequeue it` 1 → 2. The self-test printed `2 of 296 case(s) failed`:
`every-size-refusal-kind-carries-the-SAME-pull-back`, and
`NO-rendering-claims-a-DRAFT-conversion-dequeues-a-queued-PR` on the
three size renderings. Restore: blob == HEAD `3f59569d5403`, `git diff
HEAD` empty.
- **Leg B: the negative pin alone.** The old parenthesis was appended to
the governed remedy, and the new text was left intact: `1 of 296 case(s)
failed`, the negative pin only, on the three governed renderings.
Restore: blob == HEAD, `git diff HEAD` empty.
- No build or `dist/` is involved, because the self-test runs this
script from source.
## Gates, at head `7f89016f9`
`node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack
--commands` (no paths) derives the same 31 commands the dispatch named.
All 31 exit 0, and `--ran` reconciles them: `31 derived famil(ies)
accounted for — 31 run, 0 NOT-MEASURED`.
- The 16 direct-node commands: `check-ci-filter-parity`,
`check-closing-keyword-parity` (+ `--self-test`),
`check-comment-mask-corpus` (7658 files, 0 disagree),
`check-declaration-mirrors` (+ `--self-test`),
`check-scripts-symbol-anchors` (+ `--self-test`),
`check-self-test-wired` (+ `--self-test`),
`check-self-test-workflow-commands` (+ `--self-test`),
`check-whole-set-label-write` (+ `--self-test`), `pm/bare-root-worklist
--self-test`, and `pm/check-governed-queue-guard --self-test` (296 cases
pass).
- `pnpm check:agent-test-spelling`, `bash32-floor`, `cli-command-ids`,
`closing-target-claim`, `cross-package-test-inputs`,
`driver-memory-census`, `entry-guard`, `gitlink-declared`, `nul-bytes`,
`parse-guard`, `pnpm-filter-targets`, `ratchet-remedy-authority`,
`refd-timer-probe` and `watch-hint-literal`.
- `pnpm check:pm-dispatch-gates` ran detached: `dispatch-gates
self-test: 1976 cases pass`, 882.7 s, exit 0.
- NOT MEASURED locally, left to CI: the guard's own event-payload run
(it is CI-measured only), 3 families that take a value from the
workflow, and 1 CI job scheduled by these paths.
- Lint, narrowed: `eslint scripts/pm/check-governed-queue-guard.mjs
--no-inline-config --format json` read 1 file with 0 errors and 0
warnings. The effective config for this file has no
`parserOptions.project`, and its two rules (`no-restricted-imports`,
`comment-swallow/no-code-inside-block-comment`) are per-file, so this
diff cannot move the verdict on any untouched file.
- A control-byte scan of the file came back clean (`grep -naP` exit 1).
## Publishing
`scripts/pm/**` ships in no package's `files[]`, so this PR has no
changeset.
## Acceptance notes
- `scripts/pm/check-governed-merges.mjs:773-774` is a header comment,
not printed text, and it still says "Disarming alone does not dequeue:
converting the PR back to draft is what removes it from the merge
queue." That file is outside this card's file surface, so it is not
edited here. Carrier: none named.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01KTZmMfzVzjNvyaLyQ8mHvg)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 33b6e8b commit da93a8b
1 file changed
Lines changed: 102 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
| 549 | + | |
549 | 550 | | |
550 | 551 | | |
551 | 552 | | |
552 | 553 | | |
553 | 554 | | |
554 | 555 | | |
555 | 556 | | |
556 | | - | |
| 557 | + | |
| 558 | + | |
557 | 559 | | |
558 | 560 | | |
559 | 561 | | |
| |||
1448 | 1450 | | |
1449 | 1451 | | |
1450 | 1452 | | |
1451 | | - | |
1452 | | - | |
1453 | | - | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
1454 | 1461 | | |
1455 | 1462 | | |
1456 | 1463 | | |
| |||
1908 | 1915 | | |
1909 | 1916 | | |
1910 | 1917 | | |
1911 | | - | |
1912 | | - | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
1913 | 1925 | | |
1914 | 1926 | | |
1915 | 1927 | | |
| |||
2819 | 2831 | | |
2820 | 2832 | | |
2821 | 2833 | | |
2822 | | - | |
2823 | | - | |
2824 | | - | |
2825 | | - | |
2826 | | - | |
2827 | | - | |
2828 | | - | |
2829 | | - | |
2830 | | - | |
| 2834 | + | |
| 2835 | + | |
| 2836 | + | |
| 2837 | + | |
| 2838 | + | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
2831 | 2846 | | |
2832 | 2847 | | |
2833 | 2848 | | |
| |||
3681 | 3696 | | |
3682 | 3697 | | |
3683 | 3698 | | |
| 3699 | + | |
| 3700 | + | |
| 3701 | + | |
| 3702 | + | |
| 3703 | + | |
| 3704 | + | |
| 3705 | + | |
| 3706 | + | |
| 3707 | + | |
| 3708 | + | |
| 3709 | + | |
| 3710 | + | |
| 3711 | + | |
| 3712 | + | |
| 3713 | + | |
| 3714 | + | |
| 3715 | + | |
| 3716 | + | |
| 3717 | + | |
| 3718 | + | |
| 3719 | + | |
| 3720 | + | |
| 3721 | + | |
| 3722 | + | |
| 3723 | + | |
| 3724 | + | |
| 3725 | + | |
| 3726 | + | |
| 3727 | + | |
| 3728 | + | |
| 3729 | + | |
| 3730 | + | |
| 3731 | + | |
| 3732 | + | |
| 3733 | + | |
| 3734 | + | |
| 3735 | + | |
| 3736 | + | |
| 3737 | + | |
| 3738 | + | |
| 3739 | + | |
| 3740 | + | |
| 3741 | + | |
| 3742 | + | |
| 3743 | + | |
| 3744 | + | |
| 3745 | + | |
| 3746 | + | |
| 3747 | + | |
| 3748 | + | |
| 3749 | + | |
| 3750 | + | |
| 3751 | + | |
| 3752 | + | |
| 3753 | + | |
| 3754 | + | |
| 3755 | + | |
| 3756 | + | |
| 3757 | + | |
| 3758 | + | |
| 3759 | + | |
| 3760 | + | |
| 3761 | + | |
| 3762 | + | |
| 3763 | + | |
| 3764 | + | |
| 3765 | + | |
| 3766 | + | |
3684 | 3767 | | |
3685 | 3768 | | |
3686 | 3769 | | |
| |||
4319 | 4402 | | |
4320 | 4403 | | |
4321 | 4404 | | |
4322 | | - | |
| 4405 | + | |
| 4406 | + | |
| 4407 | + | |
| 4408 | + | |
4323 | 4409 | | |
4324 | 4410 | | |
4325 | 4411 | | |
| |||
0 commit comments