Repository navigation
Description
Part of #2934 (Phase A). Implements questions 1 and 2 of the #2938 ruling.
Blocked by #3268
Context
About a quarter of main squashes since 2026-10-14 changed the proof system (see #2938). The maintainer ruled that proof-system and global-tooling changes land one at a time under the existing reservation, and that product changes do not wait on them. After such a change merges, the next may merge once that change's own main run is green (amended 2026-11-02; it previously also required the next 2 main runs). After a failed main run, the lane reopens at the next green main run. Related proof-system changes may land as one squash, which counts once. The ordinary merge path is bun scripts/integrate.ts merge (docs/decisions/ci-utility.md, "Exact-candidate integration reservation"). It checks candidate proof (verifyIntegrationProof, scripts/integration-proof.ts:69) but knows nothing about proof-system changes.
Scope
integrate.ts confirmandmergeclassify the candidate with the path-set command from ci: define proof-system changes in one path-set file with a deterministic timeout-change check #3268.- For a proof-system candidate, both refuse unless the most recent merged proof-system change on main has a completed, green main-push CI run at its own squash. If a later main run failed, the latest completed main-push run must be green. The refusal prints the blocking squash and the runs it found.
- Product candidates are never refused by this check.
- A read-only
bun scripts/integrate.ts lane --jsonreports the last proof-system squash, its window runs and whether the lane is open. - Red-main fixes declared under ci: restore one recorded merge path and refuse merges with uncovered local skips #2940's expedited mode are exempt from the window, as ruled (question 3: fixes use the fast track).
Out of scope
- The path set itself (ci: define proof-system changes in one path-set file with a deterministic timeout-change check #3268).
- Epoch reporting (separate task) and off-main qualification enforcement (separate task).
- Any change to product-candidate confirmation.
Acceptance criteria
- With fixture main history where the last proof-system squash's own run has not settled (queued or in progress), or a later main run failed with no green run after it, a proof-system candidate is refused with "1 more green main run required". A product candidate is accepted. Each is proven by a test that fails before the change. (Corrected 2026-11-17 to the single-run window; the earlier wording encoded the superseded three-run window.)
- With the squash's own run green, the proof-system candidate is accepted, without waiting for later runs.
- After a later failed main run, a single later green run reopens the lane.
- A missing, in-progress, cancelled or failed run in the window counts as not green.
lane --jsonreports the same decision as the refusal, from the same function.- Restored mutation receipt: counting a cancelled run as green makes the named test fail.
Verification
bun run test tests/integration-command.test.ts plus the new lane tests and mutation receipt.
Contract impact
None: repository script output.
Activity
feat(ci): define proof-system changes in one path-set file with a tim…
feat(ci): define proof-system changes in one path-set file with a tim…
schlessera commentedon Nov 2, 2026
2026-11-02: blocker #3268 is delivered (PR #3276, squash
b228b1f21c4758ee712e922d12ebbe77cf4b3512on main), soblockedis removed. TheBlocked by #3268line stays as history.Use
import { classify } from "./proof-system":classify(base, head, { cwd?, pathSet? })returns{ schemaVersion, base, head, proofSystem, reasons }and throws when the diff cannot be computed, so an error never reads asfalse.matchProofSystemPath(path)gives a path-only check. The CLI isbun scripts/proof-system.ts classify --base <sha> --head <sha> [--json]. The timeout check flags changed timeouts in rewritten existing test lines and file-widesetDefaultTimeoutchanges, not new tests that set their own timeout (see the PR for the reasoning).schlessera commentedon Nov 2, 2026
Claimed while working epic #2934 end to end (claim token
wi-20261102-fd2d2f21). Intended branch:feat/3269-3271-lane-enforcement, built on #2940's branch because both changescripts/integrate.ts.schlessera commentedon Nov 2, 2026
Implementation pushed, PR held for its stack base. #3269 and #3271 are implemented together on
feat/3269-3271-lane-enforcementat5224e5ff75e4c66570b563509de706d21c03884b(updated for the window clarification), stacked onfeat/2940-recorded-merge-path(07fd0ecc7, no PR yet). That branch is in turn on #3279 (feat/2942-red-main-controller). The change uses #2940's--fixes-main-runmode for the red-main fix exemption, so its PR opens only after #2940 has merged to main.What it does
scripts/proof-system-lane.tsholds the decision functions; it lists no globs and reusesclassifyfromscripts/proof-system.ts.integrate.ts confirm(before acquiring) andmerge(after the lease check) classify the candidate from merge base to head and hold only proof-system candidates.ci.ymlrun must be completed and green. After it, two consecutive later main runs must be completed and green.unknownand refused.N more green main run(s) required.integrate.ts lane --jsonprints the sameLaneDecision(state,ownGreen,streak,required,window) andlaneRefusal.Off-main qualificationsection linking a run in this repository. The run's head SHA must be the candidate head, or an ancestor whose diff to the head is not a proof-system change. At most 5 runs are read. The PR template gains the section.--fixes-main-runfixes, and fixes declared on the open record that go through ordinary confirmation because their failures are category-level. Otherwise a proof-system fix for a red window could never land.bun scripts/proof-system.ts classify --base origin/feat/2940-recorded-merge-path --head 5224e5ff7→ not a proof-system change.Receipts
bun run test tests/integration-command.test.ts tests/proof-system-lane.test.ts tests/red-main-expedite.test.ts tests/red-main.test.ts tests/proof-system.test.ts: 62 pass, 0 fail atc445ed57f. At5224e5ff7,tests/integration-command.test.ts tests/proof-system-lane.test.ts: 27 pass, 0 fail.scripts/integrate.tsrestored to07fd0ecc7, three tests fail on their named assertions:NO_PROOF_SYSTEM_MERGE_INSIDE_THE_WINDOW:lane-short(merged)lane --json: usage error, exit 1NO_UNQUALIFIED_PROOF_SYSTEM_MERGE:lane-open-unqualified(merged)cancelledas green inisGreen):NO_PROOF_SYSTEM_MERGE_INSIDE_THE_WINDOW:lane-cancelled,OWN_RUN_NOT_GREEN:{…"cancelled"}andCANCELLED_IS_NOT_GREENfail. Restored, green.GREEN_BEFORE_THE_FAILURE_DOES_NOT_COUNT,CANCELLED_IS_NOT_GREENand thelane-cancelledscenario fail. Restored, green.NO_PROOF_SYSTEM_MERGE_INSIDE_THE_WINDOW:lane-own-red,OWN_RUN_NOT_GREENandNO_LATER_READS_AFTER_A_RED_OWN_RUNfail. Restored, green.readLane never reads more than the boundfails against a 12-squash alternating history. Restored, green.qualifies):NO_UNQUALIFIED_PROOF_SYSTEM_MERGE:lane-open-stale-runand both unit SHA tests fail. Restored, green.DECLARED_FIX_EXEMPT:expedite-lane-shortfail.bun run typecheckis clean.bun run check:pr --base origin/feat/2940-recorded-merge-pathpassed, all checkspassed, receipt head5224e5ff7.Resume steps
git rebase --onto <new head> 07fd0ecc7 feat/3269-3271-lane-enforcement.git fetch origin && git rebase --onto origin/main 07fd0ecc7 feat/3269-3271-lane-enforcement. Resolvescripts/integrate.tsagainst the squashed ci: restore one recorded merge path and refuse merges with uncovered local skips #2940, keeping the lane gate afterrefuseWhileRedand thelanecommand. Thenbun run test tests/integration-command.test.ts tests/proof-system-lane.test.tsandbun scripts/proof-system.ts classify --base origin/main --head HEAD(it must say not a proof-system change).bun run check:pr --base origin/main, thengit push --force-with-lease. Open a draft PR withCloses #3269andCloses #3271, milestone 0.45.0, the receipt block in the body and the receipts above.bun scripts/integrate.ts confirm <pr> --issues schlessera/brain-kit#3269,schlessera/brain-kit#3271. If the process dies, runreleaseon its lease.schlessera commentedon Nov 2, 2026
Decision (maintainer, 2026-11-02, given in the working session and recorded here by the agent): this clarifies how the stability window reopens after a failure. The proof-system change's own main run must be green. If any later main run in the window fails, the lane reopens once the next two consecutive main runs after the failure are completed and green. A missing, in-progress or cancelled run counts as not green. Waiting for a rerun of the failed squash, or for a maintainer revoke, is not required, so the lane cannot deadlock on a red main that was later fixed.
feat(ci): reopen the proof-system lane after two consecutive green ma…
[-]ci: land proof-system changes one at a time behind a two-green-main stability window[/-][+]ci: land proof-system changes one at a time behind a single-run stability window[/+]schlessera commentedon Nov 2, 2026
2026-11-02: the window is now a single green main run, following the maintainer amendment on #2938 (#2938 (comment)). Updated the title, background and acceptance criteria to match. The open branch is reworked to this before it is proposed.
schlessera commentedon Nov 5, 2026
Source/specification finding from the full 133-issue triage pass: the Context correctly consumes the November 2 single-run amendment, but the first acceptance criterion still refuses a proof-system candidate when the preceding change’s own run and one later run are green, demanding “1 more green main run required”. That criterion encodes the superseded three-run window and contradicts both Context and the current decision record (
docs/decisions/ci-utility.md, “Stability window”, inspected main35217d283b849b5ef81700d5d4c2ec7486405d12).Before implementation/proof, reconcile that existing criterion with the recorded single-run policy: admit after the preceding proof-system change’s own green main run, and after a failure reopen on the next green main run. Keep product candidates independent of this lane and retain the exact-candidate reservation. This records a brief inconsistency on the existing owning issue; no additional policy choice, code change, new issue or readiness change is made here.
schlessera commentedon Nov 17, 2026
Ownership reconciliation (0.45.0 orchestration, 2026-11-17): the claim on this issue and #3271 has had no activity since 2026-11-05. Its implementation waits on
feat/3269-3271-lane-enforcementat 5224e5f for #2940, which closed on 2026-11-03, and no PR was opened. Releasing the stale claim so a new worker can resume from that branch, merging main forward and keeping the existing commits.schlessera commentedon Nov 17, 2026
Claimed for implementation. Claim token:
claim-7d37050e. Branch:feat/3269-3271-lane-enforcement.Resuming feat/3269-3271-lane-enforcement (5224e5f) with main merged forward; reworking the window to the single-run amendment. Collisions: closure-only with draft PRs 3054, 3056, 3059, 3069, 3581, 3622, 4002, 4036 (3056, 3059, 3622, 4002 also touch tests/integration-command.test.ts).
schlessera commentedon Nov 17, 2026
2026-11-17: the first acceptance criterion is corrected to the single-run window recorded in
docs/decisions/ci-utility.md("Stability window") and the 2026-11-02 amendment, as the 2026-11-05 triage comment asked. The old wording ("own run green and only 1 later green run" refused) encoded the three-run window. The other criteria already match.One reading made explicit in the implementation: a failed own run also reopens at the next green main run. The decision says "if a main run fails, the lane reopens at the next green main run", and requiring a green own run would deadlock the lane whenever the proof-system squash itself broke main and a product fix repaired it, because a rerun at that squash stays red. The own run must still complete first.
schlessera commentedon Nov 17, 2026
Merged in #4145 as
564a1d57fthrough the integration lease (orchestrator merge queue for 0.45.0). Candidate confirmation passed on the exact head; the squash's own main run carries the post-merge heavy categories.schlessera commentedon Nov 17, 2026
Decision (maintainer, 2026-11-17): confirmed the reading delivered in #4145. The proof-system lane reopens at the next green main run after a proof-system change, even when that change's own main run failed. A rerun at a broken commit stays red, so requiring the change's own run to pass would block every later proof-system PR after a product PR fixed main.