Skip to content

fix(ci): a commit must not cancel another commit's run - #980

Merged
catomean merged 1 commit into
mainfrom
fix/ci-strands-commits
Sep 11, 2026
Merged

fix(ci): a commit must not cancel another commit's run#980
catomean merged 1 commit into
mainfrom
fix/ci-strands-commits

Conversation

@catomean

Copy link
Copy Markdown
Collaborator

The concurrency group was keyed by branch with cancel-in-progress: true, so a newer merge cancels an older commit's CI run — and every deploy path keys off that run:

  • a deploy that waits for CI to pass on the commit finds a cancelled run and stops;
  • a deploy chained on workflow_run sees conclusion: cancelled and skips.

auto-merge also re-arms CI with a dispatch, and under one group-per-branch that dispatch cancels the push run for the same commit.

It is not theoretical

Measured across the fleet on 2026-09-11: 28 of 39 ci.yml files had this shape. It broke two repos that day, in the two ways it can break.

repo how it failed
fleetcrown silently — Deploy skipped. Four merges sat on main, every check green, nothing red anywhere, box serving the previous build. Each needed a hand-dispatched deploy.
hirnli loudly — Deploy errored at its wait-for-CI step. The better outcome, because somebody sees it.
20:24:07  push              cancelled   84403805
20:24:08  workflow_dispatch success     84403805   ← cancelled the one above

The change

Main is keyed per commit, so both runs finish and whatever the deploy path looks for is there. Branch behaviour is unchanged — the newest push is still the only one that matters there.

Upstream: bitbaum/fleet#53 fixes the templates this was copied from and adds a ci-strands-commits rule to the hygiene audit, so the remaining repos are found by a sweep rather than by an outage.

Workflow-only change: YAML parses and the jobs are intact. This PR's own CI run exercises the branch arm of the new expression.

🤖 Generated with Claude Code

https://claude.ai/code/session_018Z7YRpgsEtNjRqr1usHMQY

The concurrency group was keyed by branch with cancel-in-progress, so a
newer merge cancels an older commit's CI — and every deploy path keys off
that run. One that waits for CI to pass on the commit finds a cancelled run
and stops. One chained on workflow_run sees conclusion=cancelled and skips.

auto-merge also re-arms CI with a dispatch, and under one group-per-branch
that dispatch cancels the push run for the SAME commit.

Measured across the fleet on 2026-09-11: 28 of 39 ci.yml files had this
shape. It broke two repos that day, in the two ways it can break.
fleetcrown failed silently — Deploy skipped, four merges sat on main with
every check green and nothing red while the box served the previous build,
each needing a hand-dispatched deploy. hirnli failed loudly, erroring at
its wait-for-CI step, which is the better outcome because somebody sees it.

Keying main per commit lets both runs finish, so whatever the deploy path
looks for is there. Branch behaviour is unchanged: the newest push is still
the only one that matters there.

The templates this was copied from are fixed in bitbaum/fleet#53, which
also adds a ci-strands-commits rule to the hygiene audit so the remaining
repos are found by a sweep rather than by an outage.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Z7YRpgsEtNjRqr1usHMQY
@catomean
catomean merged commit b7260c0 into main Sep 11, 2026
6 checks passed
@catomean
catomean deleted the fix/ci-strands-commits branch September 11, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant