You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: refuse proof-system optimizations without off-main qualification evidence on the PR #3271
The maintainer ruled that test optimizations, meaning shard layout, timeout budgets, selection rules and worker counts, are qualified by replay or dispatch runs before merging, with the evidence on the PR. Red-main fixes are exempt and use the fast track. A replay precedent exists in scripts/replay-browser-selection.ts. Nothing requires or checks such evidence today.
Scope
A PR template section, "Off-main qualification", for proof-system PRs. It names the replay or dispatch run URLs, the head SHA they ran on and the comparison they establish.
Judging whether the qualification is sufficient; that stays review.
Running replays automatically.
Acceptance criteria
A proof-system candidate without the section is refused; with a valid run URL on the head it is accepted; with a run URL whose head SHA differs and has proof-system changes after it, it is refused. Each is proven by a test that fails before the change.
A product candidate is never refused by this check.
A declared red-main fix is exempt, proven by a test.
Restored mutation receipt: accepting any run URL regardless of SHA makes the named test fail.
Verification
Focused integration-command tests and the mutation receipt.
2026-11-02: blocker #3268 is delivered (PR #3276, squash b228b1f21c4758ee712e922d12ebbe77cf4b3512 on main), so blocked is removed. The Blocked by #3268 line 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 as false. matchProofSystemPath(path) gives a path-only check. The CLI is bun scripts/proof-system.ts classify --base <sha> --head <sha> [--json]. The timeout check flags changed timeouts in rewritten existing test lines and file-wide setDefaultTimeout changes, not new tests that set their own timeout (see the PR for the reasoning).
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 change scripts/integrate.ts.
Implementation pushed, PR held for its stack base.#3269 and #3271 are implemented together on feat/3269-3271-lane-enforcement at 5224e5ff75e4c66570b563509de706d21c03884b (updated for the window clarification), stacked on feat/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-run mode for the red-main fix exemption, so its PR opens only after #2940 has merged to main.
What it does
New scripts/proof-system-lane.ts holds the decision functions; it lists no globs and reuses classify from scripts/proof-system.ts.
integrate.ts confirm (before acquiring) and merge (after the lease check) classify the candidate from merge base to head and hold only proof-system candidates.
The last proof-system squash's own main-push ci.yml run must be completed and green. After it, two consecutive later main runs must be completed and green.
A failed or cancelled run restarts the count. A squash with no run restarts it once a later squash exists.
A queued or in-progress run, or no run yet at the newest squash, is not green yet, and nothing after it counts.
Each decision reads at most 10 main runs in merge order and stops once decided. Past that bound it is unknown and refused.
The refusal says N more green main run(s) required. integrate.ts lane --json prints the same LaneDecision (state, ownGreen, streak, required, window) and laneRefusal.
Exempt:--fixes-main-run fixes, 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.
Outside the path set: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 at c445ed57f. At 5224e5ff7, tests/integration-command.test.ts tests/proof-system-lane.test.ts: 27 pass, 0 fail.
Failing first: with scripts/integrate.ts restored to 07fd0ecc7, three tests fail on their named assertions:
Mutation, clarification (no reset after a failure): GREEN_BEFORE_THE_FAILURE_DOES_NOT_COUNT, CANCELLED_IS_NOT_GREEN and the lane-cancelled scenario fail. Restored, green.
Mutation, own run (own run not required): NO_PROOF_SYSTEM_MERGE_INSIDE_THE_WINDOW:lane-own-red, OWN_RUN_NOT_GREEN and NO_LATER_READS_AFTER_A_RED_OWN_RUN fail. Restored, green.
Mutation, read bound (unbounded history): readLane never reads more than the bound fails against a 12-squash alternating history. Restored, green.
git fetch origin && git rebase --onto origin/main 07fd0ecc7 feat/3269-3271-lane-enforcement. Resolve scripts/integrate.ts against the squashed ci: restore one recorded merge path and refuse merges with uncovered local skips #2940, keeping the lane gate after refuseWhileRed and the lane command. Then bun run test tests/integration-command.test.ts tests/proof-system-lane.test.ts and bun 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, then git push --force-with-lease. Open a draft PR with Closes #3269 and Closes #3271, milestone 0.45.0, the receipt block in the body and the receipts above.
Report collisions, then bun scripts/integrate.ts confirm <pr> --issues schlessera/brain-kit#3269,schlessera/brain-kit#3271. If the process dies, run release on its lease.
Ownership reconciliation (0.45.0 orchestration, 2026-11-17): released together with #3269. Both are implemented on feat/3269-3271-lane-enforcement (5224e5f), and that work resumes there.
Merged in #4145 as 564a1d57f through 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.
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 17, 2026
Ownership reconciliation (0.45.0 orchestration, 2026-11-17): released together with #3269. Both are implemented on
feat/3269-3271-lane-enforcement(5224e5f), and that work resumes there.schlessera commentedon Nov 17, 2026
Claimed for implementation. Claim token:
claim-5bcb6f96. Branch:feat/3269-3271-lane-enforcement.Implemented together with #3269 on the same branch.
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.