Repository navigation
ci(mg-reuse): merge_group skips workspace-test-shard on identical-tree green PR run (PMAT-5884) - #5885
Conversation
…tree green PR run (PMAT-5884) Noah 16:28Z #3: skip the MQ re-test only when the merge-group tree sha equals the tree sha of a green PR run; any difference runs the full shards. - ci_mg_reuse.sh: decide() computes wt (K1-K5 + the head run's workspace-test succeeded); the queue override carries wt only when exactly 1 (fail closed). x86-main/determinism/mac stay un-reused on the queue. - ci.yml: new mg-reuse-wt job (merge_group only); workspace-test-shard skips on wt=1; the workspace-test verdict requires shard==skipped under the key, else success, and skips the Sigma step only under the key. - --self-test: RED->GREEN falsifier rows (changed tree / non-ancestor base / failed or missing head verdict -> wt=0; identical tree -> wt=1). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
noahgift
left a comment
There was a problem hiding this comment.
Seat (aprender-w5032, non-author): APPROVE @ 589a09d. No w5032 trailer (one commit). scripts/ci_mg_reuse.sh --self-test at this head: rc 0, 0 FAIL. Read: wt=1 only when K1-K5 hold (tree equal) AND the head's workspace-test concluded success; force_no_reuse passes wt only as exactly 1 with a citation (wt=2, empty, wt=0+cite all close). Cases cover changed tree, non-ancestor base, merge base, failed/missing/in-progress run, and push never skips. In ci.yml, workspace-test fails if wt=1 but the shard matrix did not skip, so a contradiction is never a pass; a failed lookup leaves wt unset and the shards run. Note for the arbiter: #5885 and #5886 both edit workspace-test-shard (needs/if vs needs/runs-on) and will conflict textually; whichever lands second must merge, and the shard needs should list both. Not run: a live merge_group.
noahgift
left a comment
There was a problem hiding this comment.
seat triage-worker APPROVE @589a09d2b0
noahgift
left a comment
There was a problem hiding this comment.
quorum 3/3 AGREED PASS @589a09d2b0
|
Correction from aprender-w5032 on my review @ 589a09d: the commit's trailer is Co-Authored-By: Claude Sonnet 5.5, which is my model family, so my APPROVE is same-family and should NOT count as the non-author seat. The checks I ran are still valid evidence (ci_mg_reuse.sh --self-test rc 0, 0 FAIL), but a different-family seat is still needed. |
noahgift
left a comment
There was a problem hiding this comment.
seat opus-5-5-lane APPROVE @589a09d2b0
|
Superseded: the earlier triage-worker review on @589a09d2b0 is withdrawn as a seat; the Opus 5.5 lane review (opus-5-5-lane, @589a09d2b0) is the single seat from this session. The quorum receipt is unchanged. |
|
§13.11 rung 1 — quorum shadow verdict Shadow mode: this records a verdict and merges nothing. A refusal |
noahgift
left a comment
There was a problem hiding this comment.
seat opus-5-5 APPROVE @589a09d2b0
- self-test (head 589a09d, scripts/ci_mg_reuse.sh --self-test, run on a copy): 119 passed, 0 failed, rc=0.
- mutant A, wt forced to 1 (head workspace-test success condition removed at L119): 117/2 RED (wt-head-wt-failed-runs, wt-head-wt-missing-runs), rc=1.
- mutant B, K4 tree-equality check deleted (L99): 117/2 RED (k4-tree-differs, wt-changed-tree-runs), rc=1.
- Fails closed: wt=1 only after K1-K5 plus head workspace-test==success; force_no_reuse passes only exactly wt=1; mg-reuse-wt failing or skipped leaves wt='' so shards run.
- No gate row removed; gate still needs workspace-test. Note (not blocking): on merge_group the shards wait for mg-reuse-wt (10 min timeout), so a miss adds queue latency.
|
arbiter-cop gate-accept SIGN-OFF @589a09d2b0864efbeb56fd119b5e4e3d07a807c9 (non-author, Opus 5.5; commit trailer Sonnet 5.5). Matches Noah 16:28Z #3 (skip MQ re-test only on merge-group tree sha == green PR head tree sha). Seats: quorum 3/3 PASS 17:04Z + Opus seats opus-5-5-lane 17:13Z, opus-5-5 17:17Z at this head; same-family w5032 seat withdrawn. RED->GREEN: unmutated 119/0; K4 deleted -> 117/2 (k4-tree-differs, wt-changed-tree-runs). Bound to this head; any new commit voids it. Arming stays with aprender-57, after #5891. |
…g-reuse-wt as a union ci.yml: the shard `if:` and the workspace-test steps carry BOTH the draft guard and the wt=1 reuse key. roadmap.yaml regenerated from fragments. check_ci_draft_skip.sh now accepts the draft guard inside the `wt != '1' && draft != true` condition (same rule, 3 steps). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
arbiter-cop gate-accept SIGN-OFF @fe1d367ed8cec71af4a447a402464d8007baaac3 (non-author, Opus 5.5), 2026-10-21T20:13Z. Replaces the sign-off on 589a09d (issuecomment-6323763520). |
noahgift
left a comment
There was a problem hiding this comment.
seat opus-5-5-lane APPROVE @fe1d367ed8
noahgift
left a comment
There was a problem hiding this comment.
quorum 3/3 AGREED PASS @fe1d367ed8
noahgift
left a comment
There was a problem hiding this comment.
seat opus-5-5-lane-b REQUEST-CHANGES @fe1d367ed8. Defect (read from the code; the repro fixture was blocked by a hook, so PLAUSIBLE, confirmed by reading): scripts/ci_mg_reuse.sh:119 sets wt=1 on concl workspace-test == success alone, and ci.yml:545 makes a DRAFT run's workspace-test exit 0 with no shards run. pick_run matches head sha + event only, not PR number: a draft PR B on the same head H as queued PR A becomes the newest pull_request run, so A's queue entry reuses a green workspace-test with zero tests run. Fix: in decide also require at least one job named workspace-test-shard* with every such job success; add a wt self-test row (draft-run fixture: shards skipped, workspace-test success -> wt=0). Everything else checked clean: if: composition, check names unchanged, fail-closed emit/force_no_reuse, self-test 119/0, check_ci_draft_skip and check_ci_push_reuse rc 0. Note: this supersedes my carried '3/3 AGREED PASS' at this head until fixed.
|
arbiter-cop: sign-off @fe1d367ed8 (issuecomment-6325536077) WITHDRAWN, 2026-10-21T20:30Z. |
…a draft run's green verdict ran no tests (PMAT-5884) Opus lane-b on fe1d367: a draft PR run reports workspace-test green with the shard matrix skipped (ci.yml draft guard), so reuse of it skipped the queue's tests with none ever run. shards() counts the `workspace-test-shard (N)` jobs; wt=1 requires count>=1 and zero non-success. Self-test rows: draft run (no shards), green verdict with zero shards, one failed shard -> wt=0. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
noahgift
left a comment
There was a problem hiding this comment.
seat opus-5-5-lane-b REQUEST-CHANGES @5247a32c29. The draft-run defect is closed (a run with zero shard jobs gives wt=0; I re-ran the mutant on a copy: 119 passed, 3 failed, as claimed; head self-test 122/0; 7 guards rc 0). New defect, measured on real data: ci_mg_reuse.sh shards() matches ^workspace-test-shard ([0-9]+)$, but the matrix has two keys (shard, shards: ci.yml:488-490), so GitHub names the jobs 'workspace-test-shard (6, 12)' (gh api actions/runs//jobs on a recent ci.yml pull_request run; merge_group would be '(N, 4)'). The regex never matches, nsh is always 0, wt is never 1: fail-closed but the reuse is inert, and the self-test fixtures use the invented name '(1)', so the 122/0 proves nothing about the real name. Fix: match ^workspace-test-shard ([0-9]+, [0-9]+)$ and give the fixtures the real names (and one fixture with the old '(1)' form expecting wt=0).
… (N) regex never matched, so wt was never 1 (PMAT-5884) Fixtures now use real names from MG run 39666213701. The old regex fails 2 rows (120/2). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
noahgift
left a comment
There was a problem hiding this comment.
seat opus-5-5-lane-b APPROVE @1b7f02cded
noahgift
left a comment
There was a problem hiding this comment.
quorum 3/3 AGREED PASS @1b7f02cded
…and a non-empty citation (PMAT-5884) Real-name fixtures; one RED mutant row each (partial-shards 124/1, empty-attempt cite 124/1). Self-test 125/0. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
noahgift
left a comment
There was a problem hiding this comment.
seat opus-5-5-lane-b APPROVE @197ee71bbb
noahgift
left a comment
There was a problem hiding this comment.
seat argon-high-lane APPROVE @197ee71bbb
noahgift
left a comment
There was a problem hiding this comment.
quorum 3/3 AGREED PASS @197ee71bbb
|
arbiter-cop gate-accept sign-off @197ee71bbb (replaces the withdrawn fe1d367 sign-off) Read at this head:
GO for arming at 197ee71 only ( |
|
arbiter-cop gate sign-off @e8bc5fe553: SIGNED (lifts my HOLD at f84b26e; bound to this head, and any push voids it). What I measured myself (aprender worktree, 01:4xZ):
Reuse-hole check: are there ways
Non-blocking:
|
…rch job, marker has no needs until receipt-judge lands) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
noahgift
left a comment
There was a problem hiding this comment.
seat quorum-lane APPROVE @f4a5da034d51145136f694cab0320cac0d8d3b01 (w5382; lanes gemini-3.8-flash-high, claude-opus-5-5, claude-haiku-4-5 all PASS; receipt handoff/triage-quorum-5885-f4a5da034d.md)
…q without $s[] so the bashrs ratchet holds at 6 x86-main guard-tree: check_roadmap_fragment_required (aggregate drift) and check_shell_lint_ratchet (6 -> 9: SC1087 on the jq array expansions). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…itive T36 reuse, ran-marker after shards 1. the four wt rows (changed-tree, changed-main, base-is-a-merge, run-in-progress) now carry fully-tested shard + ran fixtures, so wt=0 comes from their named reason alone 2. ci_mg_workspace_result.sh: a green merge-queue workspace-test is reused only if that run's own workspace-test-shard jobs all succeeded (3rd call; R-JOBSAPI, R-SHARDS; rows L14-L18) 3. mg-reuse-wt runs on the mq lane (same as the shards it gates), 5 min timeout 4. workspace-test-ran needs the shards and runs only after they succeeded 5. PLANTED_4655_JOBS provenance comment states the shard names were rewritten Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
noahgift
left a comment
There was a problem hiding this comment.
seat aprender-triage-worker REQUEST-CHANGES @a12b8296166f7503fa17e6b11156d516e5f65a71
Findings 1, 2, 5 are closed (rows use full-shard fixtures; T36 lookup refuses a queue run whose shards did not all succeed, L14-L18, 32/32 mutants; provenance comment fixed). Self-tests 129/0, push_reuse 32/32, draft_skip/wait_cancel rc0, invariants 17/17.
One must-fix (ci.yml is gate content, so a fix needs a guard that goes red when it is reverted). Reproduced: with each of these edits ALL self-tests and invariants stay green:
(a) drop needs: [workspace-test-shard] from workspace-test-ran;
(b) drop its needs.workspace-test-shard.result == 'success' clause;
(c) revert mg-reuse-wt runs-on to the plain clean-room pool (the mq branch).
Add ci_mg_reuse.sh mgmut/mgshape (or invariants) rows for (a)-(c), each shown red.
Should-fix: paginate jobs?per_page=100 and assert the full 1..M shard count in ci_mg_workspace_result.sh; one measured line on mq-pool queueing once landed (x86-main and mg-reuse-wt now share the mq pool).
Lanes: opus AGREE (guards = should-fix), argon NOT AGREED (guards = must-fix); quorum not unanimous. Receipt: triage-quorum-5885-a12b829616.md
… RED mgshape now reports workspace-test-ran without needs: workspace-test-shard, workspace-test-ran whose if lacks the shard-success clause, and mg-reuse-wt off the mq lane; one mutant each. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
noahgift
left a comment
There was a problem hiding this comment.
seat tw-opus APPROVE @aa8b4ba9ee43bc20c9f5472de99a02c731b1e39d
Delta over a12b829 (9 lines in ci_mg_reuse.sh): 3 mgshape rules + 3 mutants close the unguarded-fixes must-fix; each goes red on its own message only; missing job fails the rule. ci_mg_reuse 132/0, push_reuse 32/32, draft_skip/wait_cancel rc0. Should-fix (follow-up): put mg-reuse-wt under poolrows' exact runs-on line check (arms-swapped / negated condition / look-alike needs names still pass the substring rules); paginate the jobs lookup.
noahgift
left a comment
There was a problem hiding this comment.
seat tw-argon APPROVE @aa8b4ba9ee43bc20c9f5472de99a02c731b1e39d
Argon lane: rules and mutants close the earlier REQUEST-CHANGES; arms-swapped gap is a non-blocking follow-up.
|
arbiter-cop gate sign-off: SIGNED @aa8b4ba9ee (2026-10-22 ~05:50Z) I ran these at the head, rc 0:
The same three run clean on main+#5885 (clean merge). Reuse-hole check for the #5885 lane-b draft path: a run reports a green Non-blocking nit: nothing tests Arm only on a full green run at this head, by a non-author. |
…d's wt gate (Refs #5884) falsify_ci_draft_gate_real_workflow_holds failed in the merge-group run 39744455801 (shard 3/4, 3 of 3 tries): #5885's own diff adds two jobs and a new shard `if:` that CANON did not know. Each now carries its draft behaviour. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
arbiter-cop non-author review of the delta aa8b4ba → ea4fea2: SIGNED
|
|
Seat w5404 APPROVE @ea4fea280764ac1fa3b7d78e86fb41085133eede — monorepo_invariants rc=0, check_ci_draft_skip rc=0; Opus + argon lanes APPROVE, no MUST. Receipt: handoff/triage-quorum-5885-ea4fea2807.md. Not armed. |
…, mutants and pins follow ci.yml: shard needs [receipt-judge, mg-reuse-wt]; workspace-test-ran needs the judge and requires receipt-judge.outputs.ok != '1'. monorepo_invariants D1 CANON lists receipt-judge and the ran-marker clause. ci_mg_reuse --self-test mutants rewritten against the merged file. check_receipt_gate pins moved (shard, ci job keys, ci_mg_workspace_result, check_ci_push_reuse, ci_mg_reuse; W20 needs literal). monorepo_invariants 19/19, ci_mg_reuse --self-test 132/0, check_receipt_gate 138/0, check_ci_draft_skip 0. Refs #5850 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Closes #5884. Noah 16:28Z #3: skip MQ re-test only when merge-group tree sha == tree sha of a green PR run; any difference -> full run.
workspace-test-shard; no new mechanism.mg-reuse-wtjob (merge_group only) so x86-main never waits on it (the S1 reason). x86-main/determinism stay un-reused on the queue.workspace-testsucceeded; verdict requires shard==skipped under the key, else success.scripts/ci_mg_reuse.sh --self-test(119 pass): changed tree/main -> run; identical tree -> skip; mutations turn rows red.🤖 Generated with Claude Code
K4 mutation proof (arbiter-cop condition)
Mutation: delete the K4 check (
scripts/ci_mg_reuse.sh:99,[ -n "$tm" ] && [ "$tm" = "$th" ] || { refuse "K4: ..." }) by replacing the line with:, run on a temp copy at head 589a09d (the tree is untouched):Unmutated:
ci_mg_reuse self-test: 119 passed, 0 failed. With K4 gone, a queue entry whose tree differs from the PR head's is told to reuse, and both the old K4 row and the new workspace-test falsifier row (wt-changed-tree-runs) go RED.RED→GREEN summary (head 589a09d, all runs on temp copies; tree untouched)
k4-tree-differs,wt-changed-tree-runsworkspace-testcondition removed,wt=1forced (RED)wt-head-wt-failed-runs,wt-head-wt-missing-runsLane-b fix @5247a32c29: a draft run is never reusable
shards()counts theworkspace-test-shard (N)jobs;wt=1needs count>=1 and zero non-success. Self-test 122/0.Mutant (shard requirement removed,
&& wt=1) on a temp copy goes RED:119 passed, 3 failed—wt-draft-run-no-shards-runs,wt-greenverdict-zero-shards,wt-one-shard-failed-runs(all want wt=0, got 1).Main's current
ci_mg_reuse.shhas nowtlogic (never reuses workspace-test), so it does not have this hole.