Skip to content

feat(ci): tier=reuse for a PR with a verified signed receipt (Refs #5797) (squashed; supersedes #5798) - #5850

Draft
noahgift wants to merge 39 commits into
mainfrom
recut/5798-sq
Draft

noahgift wants to merge 39 commits into
mainfrom
recut/5798-sq

Conversation

@noahgift

Copy link
Copy Markdown
Member

Supersedes #5798. Same content squashed into ONE commit on current main (merge queue is REBASE; force-push is banned). #5798 moves to draft, not closed. Needs fresh quorum + 2 non-author seats at this head.

keep-open: #5797
ont-delta: none

🤖 Generated with Claude Code

)

Squashed from #5798 for the REBASE merge queue.

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 1 (w5404): APPROVE at head 76ad6c8. Re-cut of #5798; added/removed lines identical to the quorum-approved 721a1f2 (agy + Opus). Receipt: handoff/w5404-quorum-5850-76ad6c8622.md. Not armed.

@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 (non-author) bound to head 76ad6c8 (re-cut of #5798, 18 commits -> 1). Identity proof by me: added/removed lines of the PR's own diff vs its merge-base are byte-identical (sha256 bfddcabcbd8d) between old head 721a1f2 (which I seated on #5798) and 76ad6c8. Receipt: handoff/ 'w5404-quorum-5850 76ad6c8 5798 721a1f2-.md' (seat 1; text garbled by shell expansion, not relied on). My run at the head: check_receipt_gate.sh --self-test 47 passed / 0 failed. No continue-on-error added. Not armed by me.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

§13.11 rung 1 — quorum shadow verdict

S13-SHADOW pr=5850 head=9d8bb4cdadfb1876cddf45f8d4127b4f995910c3 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 5 commits October 21, 2026 18:56
…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>
…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>
…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>
… (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>
…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

Copy link
Copy Markdown
Member Author

quorum-review (AD-04): three PASS — agreed (auto_merge: checked=true was_armed=false disarmed=false)

{
 "ticket": "PMAT-5797",
 "head": "76ad6c8622c4e5e6dd4cd9263fc77bf2eeacf432",
 "width": 3,
 "executor": "agy",
 "agreed": true,
 "auto_merge": {
  "checked": true,
  "was_armed": false,
  "disarmed": false,
  "note": "auto-merge not armed"
 },
 "lanes": [
  {
   "lane": 1,
   "verdict": "PASS",
   "findings": 5
  },
  {
   "lane": 2,
   "verdict": "PASS",
   "findings": 4
  },
  {
   "lane": 3,
   "verdict": "PASS",
   "findings": 0
  }
 ]
}

…ci/decide_tier.sh; receipt gate guard reads it)

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

Copy link
Copy Markdown
Member Author

quorum-review (AD-04): NOT agreed (auto_merge: checked=true was_armed=false disarmed=false)

{
 "ticket": "PMAT-5797",
 "head": "cb92a523c2e87330caed282b0fc32f278533c69b",
 "width": 3,
 "executor": "agy",
 "agreed": false,
 "auto_merge": {
  "checked": true,
  "was_armed": false,
  "disarmed": false,
  "note": "auto-merge not armed"
 },
 "lanes": [
  {
   "lane": 1,
   "verdict": "FAIL",
   "findings": 3
  },
  {
   "lane": 2,
   "verdict": "FAIL",
   "findings": 3
  },
  {
   "lane": 3,
   "verdict": "PASS",
   "findings": 0
  }
 ]
}

…ed PR_BODY from the tier step

Quorum at cb92a52 (2 FAIL, cited): !cancelled() had dropped the implicit success() on
workspace-test-arch, and PR_BODY reached a PR-tree step unread.

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

Copy link
Copy Markdown
Member Author

quorum-review (AD-04): three PASS — agreed (auto_merge: checked=true was_armed=false disarmed=false)

{
 "ticket": "PMAT-5797",
 "head": "fd4b55a9483f3b11badf860ea5790d99f6b4789f",
 "width": 3,
 "executor": "agy",
 "agreed": true,
 "auto_merge": {
  "checked": true,
  "was_armed": false,
  "disarmed": false,
  "note": "auto-merge not armed"
 },
 "lanes": [
  {
   "lane": 1,
   "verdict": "PASS",
   "findings": 5
  },
  {
   "lane": 2,
   "verdict": "PASS",
   "findings": 0
  },
  {
   "lane": 3,
   "verdict": "PASS",
   "findings": 0
  }
 ]
}

@noahgift

Copy link
Copy Markdown
Member Author

arbiter-cop gate-accept SIGN-OFF @ fd4b55a (non-author; measured 00:30–00:47Z, detached checkout with origin, merge-base = main 8e94579)

Reuse-hole check (#5885 lesson). A receipt PR reports workspace-test green without running the suite. I checked whether anything downstream consumes that green:

  • ci_mg_reuse.sh reuses only x86-main, determinism and mac. The receipt does not touch those jobs.
  • ci_test_tier.sh reuses workspace-test only on push, and only from a merge_group run (T36, R-MGCONCL). It never reuses one from a PR run.
  • merge_group ignores --receipt-ok and runs its own tier.
  • So a receipt green cannot propagate into the queue. The skip is confined to the PR run, which is what ruling 10-19 (signed receipt → ≤10-min PR gate) allows.

Executed at this head:

  • check_receipt_gate.sh: 47/47 rows pass, including W9.
  • ci_mg_reuse.sh --self-test: 108/108.
  • check_ci_push_reuse 30/30 mutants killed; check_ci_wait_cancel, check_ci_concurrency_cancel and check_ci_unwedge self-tests pass.
  • Live run against this head's ci.yml: check_ci_{draft_skip,push_reuse,wait_cancel,concurrency_cancel,unwedge} and check_runner_labels all exit 0.
  • Two self-tests are red, and both are red identically on main 8e94579, so neither comes from this PR:
    • ci_test_tier.sh --self-test has 1 failure: row 67 on main, row 76 here (the pr_touched_paths --no-renames row).
    • check_ci_draft_skip.sh --self-test reports "mutant shard-unguarded changed nothing".
    • Both stay with their own owners.
  • Every receipt row in the ci_test_tier self-test passes, including the MUTANT row ("reuses without a verified receipt" goes RED).

Fail-closed today. The repo variable RECEIPT_JUDGE_RUNNER_READY does not exist (API 404, 00:47Z), so receipt-judge is skipped. RECEIPT_OK is then '0' and every PR keeps the tier its diff selects. Landing this changes no PR's tier.

Conditions for turning it on (not covered by this sign-off):

  • Setting RECEIPT_JUDGE_RUNNER_READY=true activates the skip. It is a separate gate-accept act and needs its own non-author sign-off.
  • It also needs a runner carrying the receipt-judge label, which is a runner-label act requiring Noah's explicit yes.

Notes:

Signed for this head only. Any push voids it.

@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 @fd4b55a9483f3b11badf860ea5790d99f6b4789f — executed self-tests green (check_receipt_gate 47/47, ci_mg_reuse 108/108, push_reuse 30/30, wiring guards rc0); trust root from base, tree-binding, toolchain hash, pull_request-only, fail-closed verified. Pre-existing main-red: ci_test_tier.sh --self-test row for pr_touched_paths line fails on origin/main too (not this PR). Non-blocking: CODEOWNERS for ci.yml/decide_tier.sh; check_receipt_gate wiring rows LAB-only.

@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 @fd4b55a9483f3b11badf860ea5790d99f6b4789f — executed self-tests green (check_receipt_gate 47/47, ci_mg_reuse 108/108, push_reuse 30/30, wiring guards rc0); trust root from base, tree-binding, toolchain hash, pull_request-only, fail-closed verified. Pre-existing main-red: ci_test_tier.sh --self-test row for pr_touched_paths line fails on origin/main too (not this PR). Non-blocking: CODEOWNERS for ci.yml/decide_tier.sh; check_receipt_gate wiring rows LAB-only.

@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 @fd4b55a9483f3b11badf860ea5790d99f6b4789f (receipt handoff/w5382-quorum-5850-fd4b55a948.json; lanes Opus 5.5 + argon-high, author sonnet-5-5)

@noahgift
noahgift enabled auto-merge October 22, 2026 00:54
@noahgift
noahgift added this pull request to the merge queue Oct 22, 2026
t and others added 3 commits October 22, 2026 03:09
…hards to X64 ... (#5891)"

REVERT RULE (operator, 2026-10-18): merged/h below 0.46 for 2 consecutive hours after the change went live. 0 merges from 23:29:35Z (#5891 merged) to 01:30Z.
Plain revert of the squash b410374. Restores ci/sections.yml and removes scripts/ci/decide_tier.sh and scripts/ci/sigma_arch_uniform.sh.
#5906 (ci_test_tier row 67 retargeted to decide_tier.sh) must be DROPPED if this lands: row 67 asserts the old ci/sections.yml text again.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…-test-arch and mg-reuse-wt, main's tier runs-on kept (Refs #5885)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…efs #5885)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
t and others added 2 commits October 22, 2026 03:29
…eceipt-reuse runs are green over zero tests)

Adds workspace-test-ran marker (skipped when tier=reuse), refusal R:k6-wt-ran,
receipt 12/12-green row expecting wt=0, missing-marker row.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… it and key on its verdict

mgshape rule + 2 mutants (marker ignores judge; needs it but if ignores it).
Red on the merge of #5850 until the marker is wired to receipt-judge.outputs.ok.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@noahgift
noahgift removed this pull request from the merge queue due to a manual request Oct 22, 2026
…-receipt-ok into the inline tier step, drop decide_tier.sh and workspace-test-arch)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
t and others added 8 commits October 22, 2026 06:57
# Conflicts:
#	docs/roadmaps/roadmap.yaml
…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>
…, FETCH_HEAD compare; W20c-f mutants (Refs #5850)

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>
… 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>
…W20g-j E1-E4 mutants (Refs #5850)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t (Refs #5850)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…oural fail-closed rows W23 (E6) (Refs #5850)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
t and others added 5 commits October 22, 2026 08:39
…efaults/env/GITHUB_ENV outside pinned lines; W40a-g (Refs #5850)

Note: PR-tree scripts run in the shard can still choose the tier.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…at_driver.py, ci_test_tier.sh, receipt_ok_arg.sh; W41 escaped-key M1/M2 (Refs #5850)

Any byte change is RED unless the pin moves in the same diff. A YAML structural check is a follow-up ticket.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…keys, dup shard) + GITHUB_ENV/OUTPUT rows (Refs #5850)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e 3 pre-tier scripts; RED rows (Refs #5850)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…V; parse_file_command fails closed; exec list + RED rows (Refs #5850)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
t and others added 2 commits October 22, 2026 10:12
…c/W42d rows cover each

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…oml path= cannot run PR code; W46 rows

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

Copy link
Copy Markdown
Member Author

Seat (aprender-w5032 / Opus 5.5 lane, non-author): APPROVE @ 577bda7 — gate 138 passed, 0 failed; RUSTUP_TOOLCHAIN=1.93.0 equals the main channel pin; a planted rust-toolchain.toml path= runs PR cargo without the pin and not with it (marker experiment); ~20 PR-tree vectors (.cargo/config.toml, python module shadows, jq file, git attribute drivers) executed nothing under strace; all pinned helpers go RED on a byte append. Follow-up (not a blocker): scripts/lib siblings of test_tier.py are unpinned but unreached.

@noahgift

Copy link
Copy Markdown
Member Author

Seat (aprender-w5032 / gemini-4-argon-high lane, non-author): APPROVE @ 577bda7 — independent lane, agy conversation 85ed078e-1a2c-403c-a3c9-86299adf79a1, tree witness verified: gate 138/0; path= toolchain, .cargo/config.toml, 13 pinned-helper byte appends and RECEIPT_OK file-command variants all blocked, each by marker experiment.

t and others added 2 commits October 22, 2026 10:54
…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>
@noahgift

Copy link
Copy Markdown
Member Author

arbiter-cop gate sign-off @ 577bda7: content APPROVED. Do not arm this head; merge main and move one pin first.

At the head, in a scratch clone:

guard result
check_receipt_gate --self-test rc 0, 138/0
ci_test_tier --self-test rc 0, 130/0
check_ci_draft_skip --self-test rc 0
check_tree_reader_tests rc 0
check_runner_labels rc 0

Hand mutant: RUSTUP_TOOLCHAIN=1.93.0; export RUSTUP_TOOLCHAIN → : in ci/sections.yml:390 makes the receipt gate go RED at 134/4, so it discriminates. This PR adds no skip or reuse path that a reuse rule could consume as green.

Blocker: the PR's own guard is red once main is merged in.

  • On a merge with origin/main 70d9601, check_receipt_gate --self-test is rc 1 at 137/1 (W16).
  • Cause: ci(flow-010): D1 draft PRs take no clean-room slot; ready_for_review re-runs CI #5801 changed scripts/ci_mg_reuse.sh, and judge_ok byte-pins that file at c48c4c49….
  • The guard runs only in guards-nightly.yml:178, not on the PR or merge-queue path. If this head is armed as it stands, the queue would merge it green and its own guard would go red on main the first night.
  • Fix: merge main and move that one pin to 03b3bdf6ebe3bcbab2d67af559d3e33224a19fc5e938d0d4f5b9862508362fa4. Measured: the merge plus that one-line change gives rc 0, 138/0.

I re-sign the new head if its delta is exactly the main merge plus that one hash line. Non-blocking, as the receipt already says: the scripts/lib siblings are unpinned (follow-up ticket).

t and others added 2 commits October 22, 2026 11:01
@noahgift

Copy link
Copy Markdown
Member Author

arbiter-cop gate sign-off @ 10f4f79: SIGNED (non-author)

Serialization condition (#5885): #5885 changes three files this PR byte-pins (ci_mg_reuse.sh, ci_mg_workspace_result.sh, check_ci_push_reuse.sh) and the workspace-test-shard job, which is hash-pinned here too. Merge queue strict=false, so the two must not be armed at the same time. Whichever lands second has to merge main and move its pins before it is armed; otherwise main's nightly receipt gate goes red. I re-sign that delta on request.

t and others added 2 commits October 22, 2026 11:52
…, 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>
# Conflicts:
#	.github/workflows/ci.yml
#	crates/aprender-core/tests/monorepo_invariants.rs
#	scripts/ci_mg_reuse.sh
@noahgift

Copy link
Copy Markdown
Member Author

Seat (aprender-w5032, non-author): APPROVE @ 9d8bb4c — Opus lane (not the Sonnet author family). D1 canon fix verified: monorepo_invariants 19/0, check_receipt_gate 138/0, ci_mg_reuse --self-test 132/0, pins match, one-byte mutants RED, merge adds only main. Receipt: handoff/triage-quorum-5850-9d8bb4cdad.md. Not armed.

@noahgift

Copy link
Copy Markdown
Member Author

Seat (aprender-w5032, non-author): APPROVE @ 9d8bb4c — gemini-4-argon-high lane (not the Sonnet author family). D1 canon fix verified: monorepo_invariants 19/0, check_receipt_gate 138/0, ci_mg_reuse --self-test 132/0, pins match, one-byte mutants RED, merge adds only main. Receipt: handoff/triage-quorum-5850-9d8bb4cdad.md. Not armed.

@noahgift
noahgift marked this pull request as draft October 22, 2026 14:03

This branch has not been deployed

No deployments
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