ci-validation: keep push and pull_request runs from cancelling each other - #87
Merged
Merged
Conversation
…ther A branch with an open PR sends a push and a pull_request event for the same commit. Both landed in one concurrency group, so the second run cancelled the first and its tracker reported the cancelled job as a failure. The event name now separates them; newer runs of the same event still cancel older ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QwYWVPse8spRrfMMcuTJPv
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates ci-validation concurrency grouping to include the target event name, preventing push and pull_request runs for the same branch and commit from cancelling each other while retaining latest-run cancellation within each event type. Sequence diagram for event-specific CI validation cancellationsequenceDiagram
participant Push as push run
participant PR as pull_request run
participant Group as Concurrency group
participant Tracker as Validation tracker
Push->>Group: ci-validation-repo-ref-path-push
PR->>Group: ci-validation-repo-ref-path-pull_request
Group-->>Push: Keep running
Group-->>PR: Keep running
Push->>Tracker: validate_node
PR->>Tracker: validate_node
opt Newer push arrives
Push->>Group: Replace push group
Group-->>Push: cancel-in-progress
end
opt Newer pull_request update arrives
PR->>Group: Replace pull_request group
Group-->>PR: cancel-in-progress
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
workflows | 8d7a428 | Commit Preview URL Branch Preview URL |
Sep 27 2026, 09:21 PM |
There was a problem hiding this comment.
Sorry @HereLiesAz, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 23 hours and 43 minutes by commenting @sourcery-ai review. Upgrade to get a review now.
This was referenced Sep 27, 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.
A branch with an open PR gets a
pushand apull_requestevent for the same commit. The gateway'snormalizeWebhookContextgives both the samerefName(the branch), so both dispatches landed in the sameci-validation-<repo>-<ref>-<path>concurrency group. The second run cancelled the first, and the tracker watching the first reportedvalidate_node: cancelledas a failure. That happened on HereLiesAz/azphalt#231 and #232.The fix adds
inputs.target_event_name, which is a required input, to the group:Trade-off: a branch with an open PR now runs validation twice per commit, once per event. Stopping that would need the gateway to drop one of the two events, and it can't do that across the board, because some workflows (for example the OpenCode review, which comments on the PR) need the PR event.
ci-validation.ymlis the only workflow that keys its group on the ref this way.audit_workflow_collection.pyand everyscripts/test_*.pypass, and the YAML parses.🤖 Generated with Claude Code
https://claude.ai/code/session_01QwYWVPse8spRrfMMcuTJPv
Generated by Claude Code
Summary by Sourcery
Separate ci-validation concurrency groups by triggering event so push and pull_request runs no longer interfere with each other.
Bug Fixes:
Enhancements:
CI: