Skip to content

fix(ci): cancel superseded Windows supervision - #308

Merged
BunsDev merged 4 commits into
mainfrom
fix/306-cancel-superseded-windows
Sep 16, 2026
Merged

BunsDev merged 4 commits into
mainfrom
fix/306-cancel-superseded-windows

Conversation

@BunsDev

@BunsDev BunsDev commented Sep 16, 2026

Copy link
Copy Markdown
Member

Superseded pull-request runs retained a Windows runner because Windows supervisor behavior used always() at job level. Use !cancelled() while preserving Rust success, docs-only, main-push and ci:full eligibility. Keep the job name, 20-minute ceiling, main concurrency policy, native containment and independent cleanup conditions unchanged.

The regression failed on the old always() guard and passes with the new condition. All 64 specification tests, TypeScript and lint passed; independent review found no blockers. Full serial verification passed 2,127 tests with 98 skips (1,218 normal and 909 heavy), TypeScript, lint and diff checks. The exact signed executable source is ffa954c2678bd933d7057d526b5fc4ed67a16f32; its final binding covers all 25 governed files, ten production deltas and eleven explicit expectations. Frozen candidate/counterpart identities remain unchanged.

This change is separate from protected run35125287541, which uses Chat #305 / SDK #291. It does not change that run's producer or establish conformance acceptance. Cancelled jobs are not cleanup evidence. Hosted validation must show a superseded run stops and a fresh replacement completes successfully; that remains outstanding.

Use a normal merge after exact-head verification and recheck integration-tree equality. The signed source ancestry must remain reachable; do not squash this authority binding.

Refs #306. Do not close the issue until hosted supersession and replacement behavior are verified.

Review follow-up: 11 table-driven cases evaluate the extracted condition for Rust success/failure/skipped/cancelled, cancelled runs, docs-only and label gates, main and feature pushes. Both cancelled-run cases fail with the original guard. This evaluates the bounded boolean/string condition, not the GitHub scheduler. Signed head a28cf3cf0d77966667378ec812e872c5e33b5add was pushed while old Windows job104898926515 was confirmed running. Replacement CI35127584766 is now pending; actual old-job cancellation and complete replacement success remain required.

Copilot AI lite review requested due to automatic review settings September 16, 2026 17:06
@BunsDev BunsDev added the ci:full Run the macOS and Windows CI jobs on this pull request label Sep 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Hosted supersession/replacement evidence and broader condition coverage remain unresolved.

Pull request overview

This PR updates Windows CI so superseded pull-request runs honor cancellation while preserving existing eligibility, cleanup, timeout, and conformance requirements.

Changes:

  • Replaces job-level always() with !cancelled().
  • Adds workflow-condition coverage and updates conformance bindings.
  • Documents the CI behavior and outstanding hosted validation.
File summaries
File Summary
src/specification-guards.test.ts Adds workflow guard and cleanup assertions.
src/phase1-conformance-lock.test.ts Updates authority expectations.
phase1-conformance.lock.json Updates locked revision and workflow hashes.
docs/phase1-conformance.md Documents the CI policy and validation status.
.github/workflows/ci.yml Uses a cancellation-aware Windows supervision guard.
Review details

Suppressed comments (4)

.github/workflows/ci.yml:683

  • The new guard is the behavior under review, but the added specification test only string-matches the YAML and cannot establish that GitHub cancels an already-running superseded job or that the replacement reaches success. Superseded run 35126136809 has cancelled its Windows job, but replacement run 35126136902 is still in progress, so the required hosted replacement evidence is incomplete; please record a successful replacement run before approving this change.
      !cancelled() && needs.rust.result == 'success'

docs/phase1-conformance.md:2894

  • This section correctly acknowledges that hosted supersession/replacement validation is still missing, but that is an explicit #306 acceptance requirement: local tests cannot prove that cancellation releases the concurrency slot or that the replacement validates the current head. Please obtain and record that hosted evidence before treating this binding as complete.
must pass all required checks. Issue #306 tracks this change and the remaining
hosted supersession/replacement validation. The motivating old-head run
`35117564510` was cancelled while its Windows job continued to completion; the
replacement run `35118809575` subsequently passed all eleven jobs. That history
does not validate the new cancellation guard.

src/specification-guards.test.ts:1246

  • This regression test only matches the workflow text; it cannot exercise GitHub's cancellation scheduler, which is the failure mode changed here. Issue #306 requires hosted evidence that a superseded PR run terminates and a fresh replacement completes successfully, so the cancellation behavior remains unverified until that run is captured.
  it('cancels superseded Windows supervision without dropping its eligibility gates', () => {
    const workflow = readText('.github/workflows/ci.yml');
    const job = workflow.split('\n  windows-supervisor-behavior:\n')[1];
    expect(job).toBeDefined();
    const condition = job?.match(/\n {4}if: >-\n([\s\S]*?)\n {4}timeout-minutes:/)?.[1];

src/specification-guards.test.ts:1250

  • This guard only compares the workflow text; it never evaluates the condition for successful versus skipped/failed Rust, a cancelled pull-request run, or a protected main push. A regression in the expression's behavior could therefore still pass this test, while issue #306 explicitly calls for those focused cases. Add table-driven condition coverage (or an equivalent workflow-level test) for those scenarios.
    const condition = job?.match(/\n {4}if: >-\n([\s\S]*?)\n {4}timeout-minutes:/)?.[1];
    expect(condition?.trim()).toBe(
      "!cancelled() && needs.rust.result == 'success'\n" +
        "      && needs.changes.outputs.docs_only != 'true'\n" +
        "      && ((github.event_name == 'push' && github.ref == 'refs/heads/main')\n" +
  • Files reviewed: 5/5 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@BunsDev
BunsDev merged commit 4355c19 into main Sep 16, 2026
21 of 22 checks passed
@BunsDev
BunsDev deleted the fix/306-cancel-superseded-windows branch September 21, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Run the macOS and Windows CI jobs on this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants