Repository navigation
Cancel superseded CI runs - #286
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Scoped by
github.ref, so a PR andmainnever 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
pushtrigger is scoped to[main], so a branch with no open PR runs nothing — but it means finding out at the end. The--features smtpbreak 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