Skip to content

fix(ci): require successful off-main qualification runs - #4173

Merged
schlessera merged 8 commits into
mainfrom
fix/4171-qualification-success
Nov 17, 2026
Merged

schlessera merged 8 commits into
mainfrom
fix/4171-qualification-success

Conversation

@schlessera

@schlessera schlessera commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Closes #4171

What changed

Off-main qualification now accepts only a linked run with status completed and conclusion success. The integration caller reads both fields from GitHub; refusals name the run, status and conclusion. The existing repository, head/ancestor and five-run rules remain intact, and the decision record states the passing-run requirement.

Why this shape

This applies #4171's scoped correction without selecting which workflows count or changing the main-run stability window. No package or integration contract changes.

Proof

  • Failing first: bun run test tests/proof-system-lane.test.ts — 13 pass, 9 fail; invalid states incorrectly returned evidence instead of the named refusal assertion.
  • Conclusion mutation: removing run.conclusion !== "success" — 17 pass, 5 fail, including refuses qualification run state completed / failure, on the expected refusal assertion.
  • Restored and added bounded/mixed-evidence coverage: 23 pass, 0 fail. Successful head/ancestor cases and proof-system-change refusal remain covered.
  • bun run check:pr --base origin/main: receipt below. The first attempt lacked installed dependencies; installed with bun install --frozen-lockfile before repeating.
  • No core package is touched; independent review is not required.

Off-main qualification

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

CI run https://github.com/schlessera/brain-kit/actions/runs/44082102837 is running on head 71df8119de6d54e5505d3188dc5b4605dd39da63 after correcting the qualification fixture. Successful completion remains required; earlier qualification does not cover this head.

Guard containment

A linked run with unknown, unfinished or non-success state is refused as evidence for this candidate only. Other linked runs are still considered within the existing five-run cap: the mixed-evidence test proves a failed run leaves subsequent successful evidence usable. Accepting incomplete evidence as a restricted mode would defeat qualification, so confirmation stays restricted until passing evidence exists. A completed successful run clears the condition automatically when qualification is checked again; no latch or restart is involved. The CLI refusal records the run and state for the owner, and this PR retains the behavioral receipts. Workflow eligibility and the main-run lane remain outside this guard.

Anything left open

Successful final-head CI qualification remains pending. The orchestrator owns confirmation and merge.

Checklist

  • Focused behavioral and mutation receipts recorded.
  • No core package touched; independent review not required.
  • Milestone 0.45.0 applies to this issue and PR.
  • No consumer change requiring a changeset or integration-contract update.
  • Documentation updated; leakage gate clean; containment questions answered.
  • No provider-facing history or turn path changed.
  • Successful final-head off-main qualification linked before landing.
{"version":1,"kind":"brain-check-pr-receipt","head":"9b9da6deee4d11f3cc9893b732de487f4bdcb286","base":"origin/main","mode":"focused","startedAt":"2026-11-17T17:38:52.975Z","finishedAt":"2026-11-17T17:40:23.164Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":12861.948416},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":114.02059699999882},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":88.0709910000005},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":23.600123000000167},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":77083.986447}]}

Collision check

bun scripts/collisions.ts --json --pr 4173 at head 71df8119de6d54e5505d3188dc5b4605dd39da63 reported:

Qualification fixture correction

The integration-command fake qualification run 555 now explicitly reports completed and success; all assertions and stale/missing-evidence refusal cases remain unchanged. Audited all test QualificationRun, readRun, checkQualification, qualification-section and Actions-run fixtures: no other missing qualification state fields were found.

  • Before correction: both reported integration tests failed with run 555 unknown/no conclusion (47 pass, 2 fail).
  • After correction: bun run test tests/integration-command.test.ts tests/proof-system-lane.test.ts passed all 49 tests.
  • NODE_OPTIONS=--max-old-space-size=8192 bun run typecheck passed.

@schlessera schlessera added this to the 0.45.0 milestone Nov 17, 2026
@schlessera schlessera added type: fix Something is broken and must behave the way it is documented. area: ci CI workflows, the gates they run, release scripts, packaging. labels Nov 17, 2026
@schlessera
schlessera marked this pull request as ready for review November 17, 2026 11:56
@schlessera
schlessera marked this pull request as ready for review November 17, 2026 18:00
@schlessera
schlessera merged commit b23eace into main Nov 17, 2026
66 of 68 checks passed
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: off-main qualification accepts a linked run whatever its conclusion

1 participant