ci: one live run per workflow per ref (cancel superseded, never cancel main) - #249
Merged
Merged
Conversation
Every workflow now carries a top-level concurrency group so a new push to a branch or PR cancels the superseded run instead of queuing behind it in the shared account-wide runner pool. Runs on main get a unique group (run_id) so they are never cancelled and never coalesced; release/publish workflows are likewise never cancelled. Reusable (workflow_call) workflows are untouched because the caller's group governs them; constant cross-ref groups are left as deliberate serialization. 24 workflow files changed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vf5U1eUfawCVRTVnJSF2He
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.
Why
The GitHub-hosted runner pool is shared across every
zackeesrepo (~40 concurrent jobs, 5 macOS). On 2026-09-14 the global queue held 120 jobs behind 36 running; the largest contributors were runs already superseded by a newer push, or belonging to PRs merged a day earlier. Every such run is dead weight that delays every other repo.The rule
At most one live run per workflow per non-
mainref. A new push to a branch or PR cancels the run it supersedes instead of queuing behind it. Runs onmainare never cancelled and never coalesced — each merge keeps its own full result — which is why themaingroup is keyed onrun_idrather than the ref (a shared ref group would let GitHub replace a pendingmainrun with the next one).Release/publish/tag workflows get
group: <workflow>-<run_id>,cancel-in-progress: false: never cancelled, never coalesced.What changed here (24 files)
concurrencyblock got the block above, inserted afteron:.group: …${{ github.ref }}…withcancel-in-progress: trueor${{ github.event_name == 'pull_request' }}) were normalized to the same shape — the old forms either cancelledmainruns, or did not cancel superseded pushes to feature branches that have no PR yet.workflow_call-only workflows (the caller's group governs them) and constant, non-ref groups (deliberate cross-ref serialization).Mechanical change generated by one script and applied fleet-wide; YAML validated. The same PR is open in every affected repo.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Vf5U1eUfawCVRTVnJSF2He