Skip to content

fix(ci): enforce proof-system lane during lease acquisition - #4179

Merged
schlessera merged 8 commits into
mainfrom
fix/4178-acquire-proof-lane
Nov 17, 2026
Merged

schlessera merged 8 commits into
mainfrom
fix/4178-acquire-proof-lane

Conversation

@schlessera

@schlessera schlessera commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Closes #4178

What changed

integrate.ts acquire now checks the proof-system stability window and off-main qualification before taking a reservation. Fast-lane candidates receive the same refusal as confirmation; product candidates and declared red-main fixes retain their existing behavior. The fast-lane and lane documentation describe this enforcement.

Why this shape

The maintainer decision in #4178 requires reuse of refuseProofSystemLane. Calling it before acquisition closes the bypass without changing classification, qualification policy or the lane window.

Proof

  • bun run test tests/integration-command.test.ts: 27 passed, 0 failed; real executable with fixture Git remotes and offline GitHub responses.
  • Failing first: bun run test tests/integration-command.test.ts -t 'acquire enforces' failed at ACQUIRE_REFUSES_PROOF_SYSTEM_CANDIDATE:acquire-lane-own-busy (expected exit 1, received 0).
  • Mutation: limiting the new guard call back to confirm produced the same named assertion failure. Restoring the guard passed the focused test (1 passed, 0 failed).
  • Cases cover a closed lane, missing qualification, valid qualification, a product candidate and a declared red-main fix; refusals assert no reservation or candidate CI was taken.
  • Initial preflight lacked installed dependencies; installed the frozen lockfile before the final preflight below.

Off-main qualification

Exact-head CI after the orchestrator refresh merge: https://github.com/schlessera/brain-kit/actions/runs/44164738347, head e1f6f5dfded23f04dcf75ca831325e67303933f5, completed success.

Exact-head CI after the orchestrator refresh merge: https://github.com/schlessera/brain-kit/actions/runs/44160457069, head b263072391468494b536aa2873d06828998fc2cb, completed success.

Exact-head CI after the orchestrator refresh merge: https://github.com/schlessera/brain-kit/actions/runs/44155023649, head 71b9df51d40ea9eed120d238b50eceaf7bc5c4ce, completed success.

Pending the PR's own successful CI run on the final head. Qualification is not yet claimed.

Guard containment

The existing guard triggers only for a proof-system candidate with missing qualification or a closed/unknown lane. It restricts only reservation acquisition for that candidate; product candidates and declared red-main fixes remain usable (proved by the executable test). Acquiring a restricted lease would still occupy the shared reservation without a mergeable candidate, so refusal before acquisition is the narrowest useful containment. Retrying automatically clears it once a qualifying run is linked and the lane opens; no restart or human override is required. The refusal prints the affected paths and qualification/window cause to stderr, available in the command log. It changes no persistent incident state.

Checklist

  • Focused local preflight/behavioral receipts and complete selected hosted proof passed; actual head/base/job checkout evidence is in Proof.
  • Acceptance criteria implemented; remaining qualification is named below.
  • No core package is touched; no independent review record is required.
  • PR and issue assigned milestone 0.45.0.
  • No consumer-visible package change; no changeset needed.
  • Leakage checked by preflight.
  • Integration contract unchanged.
  • Documentation updated.
  • Guard containment answered above.
  • No provider turn-path change.

Anything left open

Merge origin/main after #4173 lands, preserving its successful-run qualification requirement, then refresh local proof and the single receipt. Link the successful PR CI run under Off-main qualification with the final head SHA before landing. The orchestrator owns confirmation and merge.

{"version":1,"kind":"brain-check-pr-receipt","head":"71b9df51d40ea9eed120d238b50eceaf7bc5c4ce","base":"origin/main","mode":"focused","startedAt":"2026-11-17T19:04:13.308Z","finishedAt":"2026-11-17T19:05:46.259Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":13041.101474},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":115.52033099999971},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":84.32412200000181},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":21.116257000001497},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":79670.11956400001}]}

Collision report

bun scripts/collisions.ts --json --pr 4179 at head 65eec7dbff35bf0ca6690668cda45a54625dbf54: graph built; no textual conflicts or unknown results. Closure overlaps with #3054, #3056, #3059, #3069, #3581, #3622, #4002, #4036, #4151, #4157, #4166, #4168, #4172, #4173, #4175, #4177. Shared changed paths occur with #4151 (merge reference), #4157 and #4175 (merge reference, CI decision and integration-command tests), and #4173 (CI decision and integrate.ts). These are detection results, not locks; refresh against main after #4173 lands.

@schlessera
schlessera marked this pull request as ready for review November 17, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, the gates they run, release scripts, packaging. type: fix Something is broken and must behave the way it is documented.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: the fast lane skips the proof-system lane because integrate.ts acquire never checks it

1 participant