Skip to content

ci: decide integration lanes for proof-system changes and red-main fixes #2938

Closed

Description

@schlessera

Part of #2934 (Phase A, task 2). All questions were ruled on 2026-10-25 (see the decision comment); what remains is recording the ruling and filing its implementation tasks.

Context

About a quarter of main squashes since 2026-10-14 (95 of 413 by subject) changed the proof system: CI workflows, test harness, sharding, timeouts, deadlines and watchdogs. 49 touched workflows, scripts/test.ts, scripts/unit-*, scripts/ci-*, bunfig.toml or scripts/check-pr.ts. Each such change alters every in-flight candidate's proof at once, can turn main red on unrelated later squashes, and starts a new proof-policy epoch, which docs/process/ci-throughput.md:71-76 says confounds every comparison. Global tooling changes already retain complete selection (docs/decisions/ci-utility.md:36-38), but nothing limits how many of them are in flight or how quickly they follow each other.

Ordinary product candidates, by contrast, barely contend: observed reservation occupancy was 4–6% (see the #2934 measurements).

The opposite case has no lane either. While main is red, every candidate's proof inherits the failure, yet a fix for main waits for local resources and confirmation behind those candidates like any other PR. In one recent case a red-main fix was stuck behind unrelated PRs waiting for local proof resources, and the maintainer had the agent bypass every check and merge it. The bypass was the only way out and left no recorded evidence of what was or was not proven.

Already decided (maintainer, 2026-10-25, on #2934)

  • Red-main fix lane: yes. Several declared fix PRs may exist for one incident; the first whose fix is confirmed wins.
  • Flake handling: strict. A rerun is only a triage probe; it never turns proof green, always files or updates an issue on the test, and repeated suspected flakes on one test escalate to real.
  • Red main pauses doomed work. Hosted proof whose merge ref contains the bad SHA is refused or cancelled, except declared fixes; each machine keeps its own resources for the fix.
  • Coordination runs on GitHub. A coordinator workflow and the shared reservation ref hold the repository-level red-main record; orchestrators read and enforce it.
  • Merge blocking while red: cooperative plus detection, not a ruleset.
  • The coordinator workflow may cancel PR runs (actions: write).

Questions 6, 8 and 10 below are answered by these; they stay listed for the record.

Questions for the ruling

  1. Serialized proof-system lane. Should proof-system and global-tooling changes land one at a time, under the existing reservation, while product changes do not wait on them?
  2. Stability window. After such a change merges, should the next one wait for N consecutive green main-push runs, or a fixed period? Which N or period?
  3. Off-main qualification. Must a test optimization (shard layout, timeout budget, selection rule, worker count) be qualified by replay or dispatch runs before merging, as the browser-selection replay already does (scripts/replay-browser-selection.ts), with the evidence on the PR?
  4. Epoch record. Should each merged proof-system change be recorded as a new proof-policy epoch that scripts/ci-timings.ts reports, so cohorts can be matched?
  5. Path set. Which paths define a proof-system change? Starting proposal: .github/workflows/**, scripts/test.ts, scripts/unit-*, scripts/ci-*, scripts/check-pr.ts, every bunfig.toml, **/proof-inputs.json, and test files whose diff only changes timeouts or deadlines.
  6. Red-main fix lane. Should a PR declared as the fix for a specific failing main-push run (by run ID and failing category) take precedence over ordinary candidates for local admission, hosted runners and the reservation?
  7. Expedited proof. What must such a fix prove before merging? Starting proposal: the failing category reproduced red on the base and green on the fix head, plus affected fast invariants, with the next main-push run as the complete backstop and an automatic revert if that run is red for a new reason.
  8. What a red main pauses. While main is red, should ordinary confirmations whose selected categories include the failing category wait, so they stop consuming runners on inherited failures, while non-overlapping candidates continue?
  9. Orchestrator preemption. May an orchestrator preempt its own workers' local heavy runs and draft hosted runs, and release leases its own workers hold, to admit a red-main fix? Starting proposal: yes, within its own subtree and for red-main fixes only; across subtrees only through ledger priority (the holder yields at its next admission point or term end) and the maintainer's existing revoke.
  10. Repository-level red-main record. Is the red-main state (failing run, failing categories, declared fix PR) a record in the shared reservation state that every worker's orchestrator must respect, rather than one orchestrator's local knowledge?
  11. Phase B gate. What first-main green rate, over how long a frozen epoch, opens Phase B of Epic: independent changes land on main concurrently, with only overlapping work serialized #2934?

A documented "no" to 1–4 or 6–10 closes this issue as well, with the reason recorded.

Out of scope

Acceptance criteria

Verification

The decision record cites this issue and the #2934 measurements it was based on.

Contract impact

None.

2026-10-25: all questions ruled by the maintainer; acceptance criteria now cover recording the ruling and filing its implementation tasks.

2026-10-25: the maintainer reduced the Phase B gate from 14 to 7 consecutive days.

Activity

  1. added
    type: chore
    area: ci
    needs: decision
    on Oct 25, 2026
  2. added
    priority: p1
    on Oct 25, 2026
  3. schlessera commented on Oct 25, 2026

    @schlessera
    OwnerAuthor

    Decision (maintainer, 2026-10-25): the remaining integration-lane questions.

    1. Serialized proof-system lane: yes. Proof-system and global-tooling changes land one at a time under the existing reservation. Product changes do not wait on them.
    2. Stability window: after a proof-system change merges, the next may merge only when that change's own main run and the next 2 main runs are green.
    3. Off-main qualification: required. Test optimizations (shard layout, timeout budgets, selection rules, 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.
    4. Proof-policy epochs: automatic. Each merged proof-system change opens a new epoch, derived from the path set at merge, and scripts/ci-timings.ts reports it.
    5. Path set: the proposed list. .github/workflows/**, scripts/test.ts, scripts/unit-*, scripts/ci-*, scripts/check-pr.ts, every bunfig.toml, **/proof-inputs.json, and diffs that change a test timeout or deadline constant, flagged by a deterministic check. The list lives in one file that the lane reads.
    6. Answered earlier the same day on Epic: independent changes land on main concurrently, with only overlapping work serialized #2934: red-main fix lane yes, several declared fixes allowed.
    7. Expedited fix proof: the failing tests are shown red on the bad base and green on the fix head, plus affected fast invariants. The next main run, which includes the red set, is the complete backstop; a new failure there opens a new incident.
    8. Answered earlier on Epic: independent changes land on main concurrently, with only overlapping work serialized #2934: hosted proof containing the bad commit is refused or cancelled, except declared fixes.
    9. Orchestrator preemption: within its own subtree only, and only to admit a red-main fix. It may cancel its own workers' local heavy runs and draft hosted runs and release their leases. Across subtrees only through ledger priority and the maintainer's existing revoke.
    10. Answered earlier on Epic: independent changes land on main concurrently, with only overlapping work serialized #2934: the red-main record is repository-level, in the shared reservation state.
    11. Phase B gate: 14 consecutive days within one proof-policy epoch, with first-main green at or above 80% and every red incident attributed.

    What it implies: #2940 implements the expedited merge mode under 7; #2943 implements preemption under 9 and no longer waits on this ruling; the lane, window, path set, off-main qualification and epochs need implementation tasks, filed under this issue's acceptance criteria.

  4. added
    agent-ready
    and removed
    needs: decision
    on Oct 25, 2026
  5. schlessera commented on Oct 25, 2026

    @schlessera
    OwnerAuthor

    Decision amended (maintainer, 2026-10-25): the Phase B gate (question 11) is 7 consecutive days, not 14, within one proof-policy epoch, with first-main green at or above 80% and every red incident attributed. All other answers stand.

  6. added this to the 0.45.0 milestone on Oct 25, 2026
  7. self-assigned this
    on Nov 2, 2026
  8. schlessera commented on Nov 2, 2026

    @schlessera
    OwnerAuthor

    Claimed as part of working epic #2934 end to end (claim token wi-20261102-fd2d2f21). Order chosen for earliest queue-velocity benefit: #2938+#2939 rulings first (they unlock hosted draft feedback), then the red-main/merge-path chain (#2942, #2940, #2944); #2943, #2941 and #2937 run in parallel since they touch disjoint code. Intended branch: docs/2938-2939-record-integration-rulings (one PR records both rulings, since both amend docs/decisions/ci-utility.md).

  9. schlessera commented on Nov 2, 2026

    @schlessera
    OwnerAuthor

    Delivered by #3274, squash 6dfdafe9ecdc3cd36388a0c445d928c3fdb4339f. Its parent is the tested base d6426a76 and its tree is 99a6248e, the same tree as candidate run 41420146145. The ruling is recorded in docs/decisions/ci-utility.md under "Integration lanes, red-main fixes and hosted draft feedback". Implementation tasks are filed and attached to #2934: #3268, #3269, #3270, #3271 (lane, from #2938) and #3272, #3273 (draft feedback, from #2939; runner-slot wait remains #2952). The main-push run 41420740208 was still running when this was posted.

  10. 2 remaining items

  11. schlessera commented on Nov 2, 2026

    @schlessera
    OwnerAuthor

    Maintainer amendment, 2026-11-02: stability window and bundling. Recorded at the maintainer's direction during the #2934 work.

    1. Stability window (amends answer 2). After a proof-system change merges, the next one may merge once that change's own main run is green. The two further main runs are no longer required. If a main run fails, the lane reopens at the next green main run.
    2. Bundling. Related proof-system changes may land together as one squash. That squash counts as one proof-system change for the lane, the window and the epoch. The PR names every issue it delivers, and each issue still needs its own failing-first and mutation receipts.

    Why: queued proof-system changes should reach main sooner. Off-main qualification (answer 3) and the hosted draft heavy feedback from #3272 now catch most failures before confirmation, so the extra window runs were buying little. Each queued change also contends for the shared reservation with a busy stream of product merges.

    The reading of "after a failure" in item 1 is the agent's, by analogy with the single-run window. The maintainer can correct it here.

    docs/decisions/ci-utility.md, "Proof-system lane", is updated to match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readyarea: cipriority: p1type: chore

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions