Skip to content

fix(ci): stop pushes to main cancelling each other's verify run - #63

Merged
wormeyman merged 1 commit into
mainfrom
fix/ci-no-cancel-on-main
Jul 30, 2026
Merged

fix(ci): stop pushes to main cancelling each other's verify run#63
wormeyman merged 1 commit into
mainfrom
fix/ci-no-cancel-on-main

Conversation

@wormeyman

Copy link
Copy Markdown
Collaborator

Found while verifying the merge queue from tonight: two main runs came back cancelled rather than green.

commit PR main run
5f676ea #51 success
605a4cc #52 cancelled
be5f592 #59 cancelled
0e484c0 #55 success
336dd2a #57 success

Cause is the concurrency block from #56. cancel-in-progress: true with a group keyed on github.ref is correct for pull requests - a superseded push to a PR branch is ~4 minutes of waste - but on main it 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 verify on its own PR, and ruleset EJ will 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_policy is false (see #60), so a branch need not be current with main to merge - which means a PR check can pass against an older tree than the one that ends up on main. That is not theoretical here: #56 changed vite.config.ts and #52 changed what verify itself means by adding a check:vue phase, both within the same hour. A main run is the only thing that checks the combination as shipped, and main is what deploy ships from.

The change

cancel-in-progress: ${{ github.event_name == 'pull_request' }}

Gated on the event rather than on the ref, so it keeps cancelling for pull_request, stops for push, and stays correct if a push trigger 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 check clean locally (316 files formatted, 301 files no warnings/lint/type errors). CI verify runs on this PR - and note the PR run itself exercises the pull_request side of the new expression, so a green check here proves cancelling still works where it should. The push side 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 build absent from CI).

🤖 Generated with Claude Code

https://claude.ai/code/session_01F3a2HLJ4beKARi7SPmaM54

`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
@wormeyman
wormeyman merged commit 168918e into main Jul 30, 2026
1 check passed
@wormeyman
wormeyman deleted the fix/ci-no-cancel-on-main branch July 30, 2026 06:23
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.

1 participant