Skip to content

Cancel superseded CI runs - #286

Merged
SDL-A1 merged 1 commit into
mainfrom
ci/cancel-superseded-runs
Oct 7, 2026
Merged

SDL-A1 merged 1 commit into
mainfrom
ci/cancel-superseded-runs

Conversation

@SDL-A1

@SDL-A1 SDL-A1 commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Without this, every push queues a full run and nothing cancels the one still grinding on the commit it replaced. Push five times in ten minutes and five eight-minute runs are in flight at once.

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

Scoped by github.ref, so a PR and main never cancel each other — only successive pushes to the same branch do.

Why

Not cost: Actions minutes are free on a public repository. It is that a queue of superseded runs is what makes people avoid pushing, and avoiding pushes loses exactly the feedback this workflow exists to provide.

Concretely, the alternative people reach for is "iterate all day on a branch, open one PR tomorrow". That works — our push trigger is scoped to [main], so a branch with no open PR runs nothing — but it means finding out at the end. The --features smtp break this workflow was built for was invisible to the default build and to all 2,046 tests; discovering it after a day of work with twenty commits on top is strictly worse than on the first push.

This makes the fast path cheap instead of something to route around.

🤖 Generated with Claude Code

Without this every push queues a full run and nothing cancels the one still
grinding on the commit it replaced. Pushing five times in ten minutes means
five eight-minute runs in flight at once, which is the thing that makes people
avoid pushing -- and avoiding pushes is how the feedback this workflow exists
to give gets lost.

Scoped by `github.ref`, so a pull request and main never cancel each other;
only successive pushes to the same branch do.

Actions minutes are free on a public repository, so this is not about cost. It
is about the latest commit being the one that gets tested, and about fast
iteration staying cheap enough that nobody batches a day's work into one push
to dodge the queue.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@SDL-A1
SDL-A1 merged commit bf97e2b into main Oct 7, 2026
6 of 7 checks passed
@SDL-A1
SDL-A1 deleted the ci/cancel-superseded-runs branch October 7, 2026 18:07
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.

2 participants