Repository navigation
Done
Labels
ready-for-agentFully specified; an agent can take it once its blockers have merged
Milestone
Description
Parent
Ticket CR3 of spec #2437 (0.1.2), the release gate. Size: M.
What to build
A red or missing rehearsal blocks a ship. Add one new gate to release candidate, as spec #2437 fixes it, run by both evaluate and publish before the tag:
- read the latest trusted Packages run at the candidate commit (
.github/workflows/packages.yml, thegithub-actionsapp; the same trust rules asrequired_check); - require its
rehearsalcheck run completedsuccess; - for every target in
TARGETS, read itsopenwiz-rehearsal-<version>-<target>receipt (contracts/rehearsal.v1.md) and requirestatuspasswithversion,sourceandarchive_sha256equal to the candidate's sealed artifacts.
Reasons: rehearsal_missing, rehearsal_failed, rehearsal_untrusted, rehearsal_stale and rehearsal_unreadable. Add row 19 to the README's precondition table, and the gate to the evidence the record keeps. Rows 1 to 18, their functions, their order and their reasons stay unchanged: never weaken an existing gate.
Owned paths
tools/release/candidate.py(only the new rehearsal gate, called once byevaluateand once bypublish)tools/release/test_candidate.py(only new tests)tools/release/README.md(only row 19 and one paragraph on the gate)changes/2451.md
Relies on: tools/rehearsal/rehearse.py
Links
- 0.1.2 CR2: the macOS clean-machine install rehearsal in the Packages run #2446 real: the receipts for every target, Mac included, and the finished
rehearsalcheck run the gate reads (CR1's runner, receipt contract and job, through CR2), without which the gate would block every ship - 0.1.1 polish Q: the release tools and the changelog workflow #2383 file:
tools/release/candidate.py,tools/release/test_candidate.py,tools/release/README.md
Acceptance criteria
- On fixtures, each of these is blocked with its exact reason in both
evaluateandpublish, red first: no Packages run at the commit, a run from an untrusted app or path, a red or missingrehearsalcheck run, a missing target receipt, afailreceipt, and a receipt for other bytes or another commit - A candidate with a green run and matching receipts for all three targets passes the new gate
- Every existing
test_candidate.pytest passes unchanged, and the diff leaves rows 1 to 18's code and reasons byte-for-byte as they were -
python3 tools/release/test.pypasses
Proof
P3 (gate): seam 3 red first, and the review's check that no existing gate is weakened.
Metadata
Metadata
Assignees
Labels
ready-for-agentFully specified; an agent can take it once its blockers have merged
Activity
jparker2006 commentedon Nov 23, 2026
launch-fleet: started
Hand checks before the builder starts (lead of spec #2437, under machine plan approval revision 1): the ticket is open; its only label is
ready-for-agent; no claim, builder or pull request; its blockers #2446 and #2383 are merged; no open pull request touches its owned paths, since #2781 (which heldtools/release/test_candidate.pyandtools/release/README.md) has merged. Builder: Claude Code Opus 5.5, medium effort. An approach note comes first.jparker2006 commentedon Nov 23, 2026
Approach note: #2451, a red or missing rehearsal blocks
release candidate's ship (row 19)Where. One new function,
rehearsal_reasons(record), intools/release/candidate.py. It is called once byevaluate, inside the existingif reasons != ['candidate_changed']block afterfirst_write_reasons, and its reasons are collected with the others. It is called once bypublish, on the first pass only, aftertagger(row 18) and beforegit tag. There it blocks on its first failure, like rows 15 to 18. It is not inreasons_for, so publish does not run it again before the release. Reasons:rehearsal_missing,rehearsal_failed,rehearsal_untrusted,rehearsal_stale,rehearsal_unreadable.Trust:
required_check's rules, for the Packages workflow.actions/workflows/packages.yml/runs?head_sha=<commit>and must havepath == .github/workflows/packages.ymlandhead_sha == commit.commits/<commit>/check-runsread, filtered to the namerehearsal.missing: norehearsalcheck run.untrusted: no Packages run at that path, or anyrehearsalcheck run whose app slug is notgithub-actions.(created_at, run_attempt). That run must be completedsuccess, and its ownrehearsalcheck run (matched bycheck_suite_id) must be completedsuccessat the commit; otherwisefailed.unreadable: any read error.check_runsandpagesunchanged. I re-state the selection rather than callrequired_check, becauserequired_checklooks upWORKFLOWS[gate], and adding a key there would edit row 7's table.Receipts, bound to the sealed bytes, with no new network trust. All reads go through the same
gh apichannel to api.github.com that the gate already trusts.TARGETS(three today; the gate keeps no list of its own), it listsactions/runs/<run id>/artifacts. It takes the newest unexpiredopenwiz-rehearsal-<release_version>-<target>whoseworkflow_runis that run at the commit. None:missing.actions/artifacts/<id>/zip. The zip's sha256 must equal the listing'sdigest. The zip must hold exactly one member,rehearsal.json, at most 64 KiB, strict JSON in theopenwiz.rehearsal.v1shape, for the right target. Anything else:unreadable.status: fail:failed.versionother thanrelease_version,sourceother than the candidate commit, orarchive_sha256other than the sealedarchiverow for that target:stale.evidence/rehearsal.json(run id and attempt, check-run ids, and for each target the artifact id, digest and receipt sha256) in the state folder. It never writes a new slot inrecord.json'sgates, because that would change the release-candidate.v1 contract (not owned).Rows 1 to 18 unchanged.
git diff -U0 origin/main -- tools/release/candidate.pyhas no-lines (additions only).ast.dumpcomparison of every function named in rows 1 to 18 shows they are identical at origin/main and at the head.Tests (seam 3, red first), in
test_candidate.py. One new test runs each case through bothevaluateandpublishand asserts the exact reason, with no write in any case: no Packages run; a run from another path; a run from another app; a redrehearsal; a missingrehearsal; a missing target receipt; afailreceipt; a receipt for other bytes; a receipt for another commit; a zip that doesn't match its digest. A green run with three matching receipts passesevaluateandpublish.Supporting edit (standing rule 4, synthetic answers to test fakes my change breaks). A stub gate fails 44 of the 76 existing tests, because the fixture world has no Packages run. So
World.checks()adds a greenrehearsalcheck run, a Packages run and three pass receipts built from the sealed record, andFAKE_GHreturns zip bytes for/zipreads. No assertion and no existing test body changes.Ask. The README intro line "
evaluateruns all 18" is outside "row 19 and one paragraph". My pick: leave it, and make the new paragraph say row 19 is added to both. Say if you'd rather I change "18" to "19" there.Dropped. Calling
required_check('rehearsal')through a newWORKFLOWSkey (it edits row 7's table).gh run download(more moving parts). Bindingmanifest_sha256too (beyond the spec).One-way door. None in this ticket's code: the gate only reads, and a refusal blocks a ship, which a later fix can undo.
jparker2006 commentedon Nov 23, 2026
F4 supporting edit granted (planner), for #2451:
tools/release/README.mdtools/release/test_candidate.pyLead of spec #2437, under the planner's grant authority for my own tickets. In
tools/release/README.md, the intro's count of the preconditionsevaluateruns may change from 18 to 19. Intools/release/test_candidate.py, the shared fixture world (World.checks()and the fakegh) may gain a green Packages run, itsrehearsalcheck run and pass receipts built from the sealed record, so existing tests see a passing row 19. No existing assertion or test body changes. Nothing else is granted.#2451: row 19, the rehearsal gate in evaluate and publish
#2451: README row 19 and the rehearsal gate's paragraph
jparker2006 commentedon Nov 23, 2026
agent: builder
state: done
harness: Claude Code
model: Opus 5.5
skills: build-ticket@0.2.2
step: Row 19 is built red first and handed back green as pull request 2917; awaiting review.
pr: #2917
#2451: green: row 19's proof, the full release suite and the rows 1 t…
#2451: red: unreadable receipt bytes and malformed versions refuse in…
#2451: fix: receipt decode failures refuse rehearsal_unreadable, and …
jparker2006 commentedon Nov 24, 2026
F4 supporting edit granted (planner), for #2451:
docs/evidence/2451/Lead of spec #2437, under the planner's grant authority for my own tickets. The folder holds the red and green proof logs of the build and its fix round (
red.log,red-2.log,green.log) and nothing else. Lead ruling on the fix round: with therehearsalcheck run held green, a candidate with no trusted Packages run at the commit readsrehearsal_untrusted, notrehearsal_missing. This matchesrequired_check's trust rules (a check run without a trusted workflow run is untrusted).jparker2006 commentedon Nov 24, 2026
agent: reviewer
state: done
harness: claude
model: claude-opus-5-5
skills: review-ticket@0.4.0
step: re-check posted: APPROVE at 4f9bcdf
time: 2026-11-24T12:16:11Z
pr: #2917