fix(ci): stop pushes to main cancelling each other's verify run - #63
Merged
Conversation
`cancel-in-progress: true` is right for pull requests and wrong for `main`. On 2026-07-30 six PRs merged inside half an hour and the runs for 605a4cc and be5f592 were both cancelled by the merge that followed them, so two commits on the deploy branch carry no verdict of their own. Neither commit is actually unverified - each had a green `verify` on its own PR, and the ruleset will not let anything merge without one. But "green on the PR" and "green as it sits on main" are different claims, and only the second survives a merge into a `main` that has moved since the check ran. `strict_required_status_checks_policy` is false (see #60), which is precisely what makes that gap reachable rather than theoretical. Gated on `github.event_name` rather than on the ref, so it keeps cancelling for `pull_request` and stops for `push` - which also covers a future push trigger on any other branch. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F3a2HLJ4beKARi7SPmaM54
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.
Found while verifying the merge queue from tonight: two
mainruns came backcancelledrather than green.5f676ea605a4ccbe5f5920e484c0336dd2aCause is the
concurrencyblock from #56.cancel-in-progress: truewith a group keyed ongithub.refis correct for pull requests - a superseded push to a PR branch is ~4 minutes of waste - but onmainit means a second merge kills the first one's run. Six PRs merged inside half an hour tonight, so two commits on the deploy branch have no verdict of their own.Why it matters, stated honestly
Neither commit is unverified in practice. Each had a green
verifyon its own PR, and rulesetEJwill not let anything merge without one.But "green on the PR" and "green as it sits on
main" are different claims.strict_required_status_checks_policyisfalse(see #60), so a branch need not be current withmainto merge - which means a PR check can pass against an older tree than the one that ends up onmain. That is not theoretical here: #56 changedvite.config.tsand #52 changed whatverifyitself means by adding acheck:vuephase, both within the same hour. Amainrun is the only thing that checks the combination as shipped, andmainis whatdeployships from.The change
Gated on the event rather than on the ref, so it keeps cancelling for
pull_request, stops forpush, and stays correct if apushtrigger is ever added for another branch.Cost: back-to-back merges now each get a ~4 minute run instead of one. That is the point.
Verification
pnpm vp checkclean locally (316 files formatted, 301 files no warnings/lint/type errors). CIverifyruns on this PR - and note the PR run itself exercises thepull_requestside of the new expression, so a green check here proves cancelling still works where it should. Thepushside only demonstrates itself on the next pair of rapid merges.Not addressed here: #60 (whether to make status checks strict, which would close the underlying gap directly) and #61 (
pnpm vp buildabsent from CI).🤖 Generated with Claude Code
https://claude.ai/code/session_01F3a2HLJ4beKARi7SPmaM54