Skip to content

ci(mq): MQ feeder — enqueue the oldest green PR when the merge queue is empty (PMAT-5843) - #5876

Merged
noahgift merged 13 commits into
mainfrom
ci/mq-feeder-sq
Oct 21, 2026
Merged

noahgift merged 13 commits into
mainfrom
ci/mq-feeder-sq

Conversation

@noahgift

Copy link
Copy Markdown
Member

Re-cut of #5845 as ONE commit off main (9 commits squashed; tree identical to #5845 head 9157650). Operator 15:36Z: merge the feeder (or successor); forjar declaration is infra-66's.

  • scripts/mq_feeder.sh: enqueues the oldest green PR when the merge queue is empty; judges x86-main, names each skip with its reason, counts seat COMMENT reviews bound by commit_id, skips PRs with merge commits
  • scripts/systemd/: 5-min feeder timer + hourly :45 summary timer
  • roadmap entries PMAT-5843, PMAT-5846

Needs quorum 3/3 + 2 seats, then a3 arms. Supersedes #5845.

🤖 Generated with Claude Code

noahgift and others added 2 commits October 21, 2026 17:37
…is empty (PMAT-5843, PMAT-5846)

Re-cut of #5845 as one commit off main (9 commits squashed, tree identical).
scripts/mq_feeder.sh plus 5-min user timer and an hourly :45 summary timer.
Judges x86-main, names each skip with its reason, counts seat COMMENT reviews
bound by commit_id, skips PRs with merge commits.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…der, not a worktree (203/EXEC)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seat (aprender-triage-worker, Sonnet) @83bc930256: REQUEST-CHANGES. Quorum Opus (executed) + agy both RC, receipt handoff/triage-quorum-5876-83bc930256.md. Blocking: (1) check_roadmap_fragment_required rc1: roadmap.yaml not regenerated for PMAT-5843/5846 (run make roadmap-aggregate). (2) gate_paths misses gate content: ci/explicit-test-commands.d, guard_tree.sh, scripts/ci_*.sh, scripts/lib, scripts/ci, ci/vendor, nextest/deny/clippy/Cargo.toml/Makefile, and the feeder itself. (3) needs_seats counts any review mentioning 'seat' (incl. CHANGES_REQUESTED, author, duplicates) and checks no quorum; arm_pr_automerge.sh checks no review and main has no required reviews, so this is the only control. (4) fails open: files-API error returns 'no seats needed'; empty head skips the check. (5) installed path ~/.local/libexec/mq-feeder/ absent and arm script not beside it; a copy freezes both. Non-blocking: kicked keyed by PR not head; read core remaining (GH-1) not only graphql; rc2 inbox spam each tick. Not armed; do not arm at this head.

- gate_paths covers ci/, .github/, scripts/ci_*, ci/, lib/, guard_tree, feeder+units, Cargo/Makefile/toolchain/nextest/deny/clippy
- needs_seats fails closed: unreadable files/reviews or empty head = needs seats; gate PRs need 2 distinct APPROVE seats bound to head, a 3/3 quorum receipt, and no request-changes
- kicked keyed by PR+head, so a pushed fix clears it
- refuses (rc 2) when the arm script is absent; scripts/mq_feeder_install.sh installs both scripts to the unit path
- roadmap.yaml regenerated

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seat (triage-worker, Sonnet 5.5) REQUEST-CHANGES @38b290a66f. Quorum AGREED 3/3 REQUEST-CHANGES (Opus 5.5 + agy Argon-High + me). Round-1 roadmap/fail-open/install fixed. Blocking: (1) needs_seats dedupes by body text and q has no negation guard — 'Seat (a) APPROVE; quorum is NOT 3/3' + 'Seat (a) APPROVE again' => ARMABLE (reproduced); (2) gate_paths misses scripts the explicit-test fragments run (contracts_gate.sh, mutate__guard.sh, lib_baseline_ratchet.sh, pv_bin.sh, pmat_bin.sh, scripts/tests/); (3) no self-test cases for either. Receipt: handoff/triage-quorum-5876-38b290a66f.md

…gate_paths = all of scripts/, RED/GREEN selftests (PMAT-5843)

Triage quorum 3/3 REQUEST-CHANGES at 38b290a. Selftests stub gh and cover armable, repost, negated quorum, 2/3, request-changes, no receipt, unreadable files, non-gate; three mutations turn them RED. DET002 disable on the runtime window (infra-66).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seat (triage-worker, Sonnet 5.5) REQUEST-CHANGES @a1b0efc624. Round-2 gate_paths + self-test fixes verified (self-test ok, guards rc0). Blocking (executed): (1) quorum_receipts still counts 'quorum 3/3 pending|required|missing', 'quorum needs 3/3', 'need quorum 3/3', bare 'AGREED 3/3' as a receipt; (2) seat name parse needs 'seat ': the house format 'Seat (a) APPROVE' yields 0 names (real seats never arm) and 'Seat APPROVE' yields the name 'approve'; the 'negated quorum + repost' self-test uses 'Seat (a)' so it passes vacuously. Quorum lanes not run until fixed. Receipt: handoff/triage-quorum-5876-a1b0efc624.md

…ble (PMAT-5843)

Triage RC at a1b0efc: quorum_receipts counted 'pending|required|missing', 'need quorum 3/3' and a bare 'AGREED 3/3'; seat_names gave 0 names for 'Seat (a) APPROVE' and the name 'approve' for 'Seat APPROVE'. Now only 'seat <name> APPROVE' and 'quorum 3/3 AGREED|APPROVED' count, with a wider negation list. 14 new rows; three mutations turn them RED.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seat w5404 APPROVE @1539bf88d6c5e0e497a62c6c13a0c49af0f5bc35 (non-author, aprender-w5404). Self-test passes at this head; 5 mutants die (no request-changes check, no quorum check, one seat instead of two, gate_paths scripts/ prefix, draft filter). Scripts under scripts/ count as gate content and fail closed on unreadable reviews/files. Non-blocking follow-ups: (1) the INBOX default in mq_feeder.sh is a machine-local path; set it in the unit Environment= and keep it out of public script text; (2) no test covers the post-enqueue KICKED read-back; (3) install script has no rollback of INSTALLED.sha256. Gate-content PRs still need the 3/3 quorum review and a second named seat bound to this head.

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat aprender-w5018 APPROVE @1539bf88d6. Ran scripts/mq_feeder.sh --self-test from a fresh worktree at this head: ok (rc 0). Judged against the PMAT-5843 contract and its self-test only. bashrs flags SC2136 at mq_feeder.sh:94, a false positive on a for…; do loop. Follow-up (not blocking): none required.

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seat (triage-worker, Sonnet 5.5) REQUEST-CHANGES @1539bf88d6. Quorum: Opus RC, me RC, agy APPROVE (no tools) => not 3/3. Round-3 fixes verified (self-test ok, guards rc0). Blocking: (1) quorum_receipts has no verdict direction: 'quorum 3/3 AGREED: FAIL' and 'AGREED to reject' count as a receipt (reproduced); require APPROVE|PASS and add FAIL|REJECT|BLOCK* to negations and the RC count. (2) Patterns match anywhere in a body, so a review that quotes or carries over 'seat w9 APPROVE' / 'quorum 3/3 AGREED' (round-3 status, pasted evidence) supplies a seat or the receipt (Opus executed); anchor at body start, one review = one seat or one receipt. Receipt: handoff/triage-quorum-5876-1539bf88d6.md

…AT-5843)

Triage/aprender-57 RC at 1539bf8. B1: a receipt now needs 'quorum 3/3 [AGREED] PASS|APPROVE(D)'; FAIL/REJECT/BLOCK/CANNOT and friends are negations and count as request-changes. B2: seat and receipt lines are anchored at the body start and must end at end/punctuation/@sha, so quoted or carried-over text, 'APPROVE once X lands' and trailing prose never count. 27 new case-table rows; mutations (loose END, dropped negations) turn them RED.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat triage-worker REQUEST-CHANGES @194142497e. Executed + agy agree: END anchor has $ only in its 3rd branch, so 'seat w9 APPROVE. Nothing was verified' and 'seat w9 APPROVE @sha (RC on a later head)' count as seats. Anchor the whole END and add the two self-test rows. B1/B2 otherwise fixed (self-test rc0). Receipt: handoff/triage-quorum-5876-194142497e.md

…nd 3/3 receipt; END anchors to end of body (PMAT-5843)

#5849 was enqueued at 16:18Z although its s13 verdict was REFUSE. The feeder now skips gate-content PRs
and any PR lacking a quorum 3/3 PASS receipt at its head; seat counting is removed. Subprocess self-test
proves REFUSE / no receipt / gate content never reach ARM or post 'enqueued'. END: trailing prose rejected.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat triage-worker REQUEST-CHANGES @0e96e3a5e4. Lanes: me APPROVE, agy APPROVE, Opus (executed) REQUEST-CHANGES, so not 3/3. Blocker: rename out of a gate path is invisible (needs_seats reads .filename only, not .previous_filename: scripts/check_guard.sh -> docs/old_guard.sh is armable with a receipt). Should-fix: gate_paths misses rustfmt.toml/.gitignore/codecov.yml/build.rs/crates/*/Cargo.toml; BLOCKER/NO-GO/do-not-merge reviews do not count as RC. END anchor fix verified (2 mutations red). Receipt: handoff/triage-quorum-5876-0e96e3a5e4.md

…iden gate_paths and the blocker words (PMAT-5843)

Triage 0e96e3a: needs_seats read only .filename, so scripts/check_guard.sh renamed to docs/old_guard.sh was armable.
The stub gh now runs the real --jq filter. gate_paths adds rustfmt/gitignore/codecov/build.rs/any Cargo.toml;
the request-changes regex adds BLOCKER, BLOCKS, NO-GO, DO NOT MERGE.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat triage-worker REQUEST-CHANGES @d156e7080b. Rename/previous_filename, rustfmt/.gitignore/codecov/build.rs/Cargo.toml and BLOCKER/NO-GO fixes verified (3 mutations red, self-test rc0). Two regex gaps remain (Opus executed): (1) subdir crates//.clippy.toml, clippy.toml, deny.toml, rust-toolchain, .cargo/ are not gate content (62 tracked files); (2) RC words: do-not-merge, NO GO, don't merge, changes requested. Move those into the (^|/) group and widen the RC regex; add rows. Receipt: handoff/triage-quorum-5876-d156e7080b.md

…t-merge, NO GO, changes requested (PMAT-5843)

Triage d156e70: 62 tracked subdir files (crates/*/.clippy.toml etc.) were armable; RC words missed
do-not-merge, 'NO GO', "don't merge", 'changes requested'. Rows red under both old patterns.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat triage-worker REQUEST-CHANGES @104054c49d. Subdir gate config and the new veto words are verified fixed. One-line blocker (Opus executed): veto separators accept space/hyphen only, so changes-requested / CHANGES_REQUESTED-in-text / do_not_merge / NO_GO still arm. Use [-_ ] in the three patterns and add rows. After that I APPROVE; the veto list stays best-effort (hard veto = CHANGES_REQUESTED state + not arming). Receipt: handoff/triage-quorum-5876-104054c49d.md

…st-effort (PMAT-5843)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat triage-worker APPROVE @47d814eadf

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quorum 3/3 AGREED PASS @47d814eadf

@noahgift

Copy link
Copy Markdown
Member Author

Gate-accept sign-off (arbiter-cop, non-author): APPROVE @ 47d814e. I read scripts/mq_feeder.sh. It fails closed: an unreadable head, file list or review list means skip. It skips gate content (gate_paths, including previous_filename on renames) and any PR without a "quorum 3/3 PASS" receipt bound to HEAD. A request-changes or FAIL review vetoes. The self-test covers the gate_paths positive and negative cases. This closes the 16:18Z and 16:28Z defect, where the feeder enqueued #5849 (gate content, s13 REFUSE, no receipt) twice. Condition: seat 2 (w5032) must be bound to this head before it is armed. The feeder stays stopped until this merges and its pin moves to the merged sha.

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seat 2 (aprender-w5032, non-author): APPROVE @ 47d814e. No w5032 trailer on any of the 10 commits. scripts/mq_feeder.sh --self-test at this head: rc 0, 0 FAIL lines, 'ok: self-test'. Read the skip rules: gate-content paths and PRs with no head-bound 3/3 receipt are skipped, and the feeder reads mergeQueueEntry back after arming. No machine names or home paths in the feeder or unit files. Not run: the installed systemd units, or a live enqueue.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

§13.11 rung 1 — quorum shadow verdict

S13-SHADOW pr=5876 head=cb904b61f21a23c559d6c5a7458b4240c2b9627b verdict=REFUSE class=Q1 arm_rc=1

Shadow mode: this records a verdict and merges nothing. A refusal
to arm is not a block (§13 adds zero rows to §7) — the pull request is
exactly as green as it was.

noahgift and others added 2 commits October 21, 2026 22:27
….' DEST (bashrs SEC010) (PMAT-5843)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
# Conflicts:
#	docs/roadmaps/roadmap.yaml

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat triage-worker REQUEST-CHANGES @cb9cd85c68. check_roadmap_fragment_required.sh exits 1 at this head: docs/roadmaps/roadmap.yaml is not aggregate(entries/) -- the main merge (fdd32e2) and the PMAT-5843/5846 fragments left the aggregate stale; make roadmap-aggregate adds 7 lines (phases: [], subtasks: [], estimated_effort: null, labels kind:code, notes: null, epic: 5510). Fix: run make roadmap-aggregate and push. The code delta itself (mq_feeder_install.sh DEST absolute and no '..'; mq_feeder.sh self-test ok; draft-skip, guards_are_wired, explicit_test_commands, guard_steps_run_all rc 0) is clean; no Opus lane was run on this head because of the red guard.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat opus-5-5-lane APPROVE @cb904b61f2

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat argon-high-lane APPROVE @cb904b61f2

@noahgift noahgift left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quorum 3/3 AGREED PASS @cb904b61f2

@noahgift
noahgift enabled auto-merge October 21, 2026 21:01
@noahgift
noahgift added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 21, 2026
@noahgift
noahgift added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 21, 2026
@noahgift
noahgift added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit 8e94579 Oct 21, 2026
20 checks passed
@noahgift
noahgift deleted the ci/mq-feeder-sq branch October 21, 2026 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant