ci(repo): cancel superseded release runs for chore(deps) commits - #232
Merged
Conversation
Renovate lands `chore(deps): …` commits on main in bursts, and every push to main starts a full release pipeline — lint, build, publint and the live test suite — so a batch of merges stacks runs that are outdated the moment the next one lands. Add a workflow-level `concurrency` block that buckets deps pushes into one group with `cancel-in-progress`, leaving only the newest run alive. Every other push keys the group on `github.run_id`, which is unique per run, so feature merges and the `chore(release): …` merge that runs `changeset publish` are never cancelled and never queued behind one another — a deps merge landing mid-publish cannot kill it. `concurrency` is evaluated before any job starts, so there is no `env` context or step output to hoist the predicate into; the `startsWith` check is repeated in both keys. `head_commit` is null for `workflow_dispatch`, so manual beta runs take the non-deps branch of both expressions. Assisted-by: Claude Opus 5 via Claude Code Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Greptile SummaryThe PR adds workflow-level concurrency to coalesce superseded release workflows for dependency commits without grouping feature, release, or manually dispatched runs.
Confidence Score: 5/5The PR appears safe to merge because superseded dependency runs are isolated from release, feature, and manual workflow runs. Current main-branch dependency commit messages match the new predicate, non-dependency runs receive unique group keys, and no reachable cancellation path was found that interrupts package publication. Important Files Changed
Reviews (1): Last reviewed commit: "ci(repo): cancel superseded release runs..." | Re-trigger Greptile |
garrensmith
approved these changes
Aug 4, 2026
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.
Problem
release.yamlhas noconcurrencyblock, so every push tomainstarts a full release pipeline — install, lint, build, publint, and the live test suite against real Tigris credentials.Renovate is configured to emit every dependency commit as
chore(deps): …(:semanticCommitScope(deps)+:semanticCommitTypeAll(chore)inrenovate.json), withprHourlyLimit: 4and a weekly lock-file-maintenance batch. 52 of the last 200 commits onmainarechore(deps). When a batch merges, those runs stack up — each one outdated the moment the next lands.Change
A workflow-level
concurrencyblock:Both keys test the same predicate.
cancel-in-progresswants a boolean, so it uses it raw;groupwants a string, so it maps the boolean through the&& … || …ternary stand-in (Actions expressions have no?:).chore(deps): …release-<ref>-depsrelease-<ref>-<run_id>workflow_dispatchrelease-<ref>-<run_id>Why two group keys instead of one
A single shared group with a conditional
cancel-in-progresswould let an incoming deps merge cancel whatever was running — including thechore(release): …merge that runschangeset publish. Keying non-deps runs ongithub.run_id(unique per run) puts them each in their own group, so they are never cancelled and never queued behind one another. Behaviour for feature merges and publishes is unchanged; only deps runs are affected.Notes
startsWithcheck is duplicated deliberately.concurrencyis evaluated before any job starts, so there is noenvcontext or step output to hoist it into.github.event.head_commitis null forworkflow_dispatch, which coerces to''— so manual beta runs take the non-deps branch of both expressions and are never cancelled.&& 'deps' || …idiom is only safe because'deps'is a non-empty literal; a falsy middle operand would silently fall through to the right-hand side.changesets/actionwhile it updates the Version Packages PR, which is idempotent — the next run recreates it. Achore(deps)commit never publishes, so cancellation cannot abort a release.Testing
YAML parse verified for all three workflow files. The gating itself only exercises on a real push to
main—concurrencycannot be triggered from a PR run.Changeset
None — CI-only, nothing ships to npm.
🤖 Generated with Claude Code
Note
Low Risk
CI-only concurrency tuning; publish and manual beta runs are explicitly excluded from cancellation.
Overview
Adds a workflow-level
concurrencyblock torelease.yamlso Renovate’schore(deps): …pushes onmainshare one group (release-<ref>-deps) withcancel-in-progress: true, leaving only the latest dependency-triggered release run.Non-deps pushes (features,
chore(release): …/ publish, etc.) use a per-run group (release-<ref>-<run_id>) and are not cancelled, so an incoming deps merge cannot abort an in-flight publish.workflow_dispatchbehaves like non-deps becausehead_commitis null.Reviewed by Cursor Bugbot for commit 8e076b7. Bugbot is set up for automated code reviews on this repo. Configure here.