CI: cancel superseded Claude AI review runs on rapid pushes
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
The four Claude AI workflows (ai_claude-backend-reviewer, ai_claude-orchestrator, ai_claude-rollback-safety, ai_claude-sdk-breaking-change) trigger on pull_request: [opened, synchronize] and none declare a concurrency group.
Every push to a PR launches four more jobs, and the previous four keep running against a commit nobody will merge. Observed directly: a force-push at 18:48 started a new set while the 18:46 set was still in progress on the same branch.
These workflows are not on the critical path — they are standalone, not required status checks, and have no merge_group trigger — so this is not a latency problem. It is runner contention. Measured aggregate queue on a PR run reaches 271 job-minutes with individual jobs waiting 20m, so superseded jobs holding runner slots inflate wall clock indirectly.
Fix: add a concurrency group with cancel-in-progress: true, matching the pattern cicd_1-pr.yml already uses.
Care needed for ai_claude-orchestrator, which also triggers on issue_comment and pull_request_review_comment. Cancelling in-progress runs there would kill an interactive @claude response mid-flight when a second comment arrives, so its group must keep comment-triggered runs isolated.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the four named Claude AI workflow files and compare their triggers with the concurrency pattern in cicd_1-pr.yml. Verify that pull-request runs cancel on newer pushes, while issue_comment and pull_request_review_comment runs in ai_claude-orchestrator remain isolated; done means superseded review runs no longer retain runner slots without interrupting interactive responses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100