fix(ci): claude bot's own comment shouldn't cancel its in-flight review#111
Merged
Conversation
`cancel-in-progress: true` meant the issue_comment fired by Claude posting its sticky review comment cancelled the still-running pull_request workflow that posted it. The new run gets filtered out at the job-level `if:` (comment isn't @claude or /review) so it skips, but only after taking out its parent run on the way in. Make cancel-in-progress conditional on the new event's sender not being a Bot. Human pushes / human /review comments still cancel stale runs as before; Claude's bot comment (or any other bot comment that would have been filtered anyway) now lets the in-flight run complete. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
3 tasks
EricAndrechek
added a commit
that referenced
this pull request
May 12, 2026
## Two related noise sources Both produce red workflow runs on PR pushes that don't reflect actual problems and were flooding the inbox. ### 1. `claude-review.yml` failing on PRs that edit Claude's own files The Anthropic action runs a self-validation step that fails when its own workflow file (`.github/workflows/claude-review.yml`) or the prompt template (`.github/prompts/pr-review.md`) is in the PR's diff. Every PR touching Claude's wiring (#105, #108, #109, #110, #111, #113, the merge commit of #115) has logged a noisy red Claude check that resolves itself once the change merges. **Fix:** in `claude-review.yml`'s gate step, query the PR's changed files; if either path is in the diff, set `skip=true` and exit 0. The check shows success, the action never runs, the change still takes effect on the next PR's review. ### 2. `dependabot-automerge.yml push failure` ghost runs on every branch push #115 added `reviewers: ${{ replace(env.ADMINS, ',', ' ') }}` to convert the comma-separated `ADMINS` env var to the space-separated form the composite expects. Problem: `replace()` isn't a GitHub Actions expression function. The valid list is `contains`, `startsWith`, `endsWith`, `format`, `join`, `toJSON`, `fromJSON`, `hashFiles`, plus status checks. An unknown function fails workflow validation, and GitHub records a failed run with the file path (not the workflow's `name:`) as the display name and no jobs — every push to any branch since #115 merged. **Fix:** replace the bad expression with a real bash step that uses parameter expansion (`${ADMINS//,/ }`) to write `ADMINS_SPACE` to `$GITHUB_ENV`. The composite's `with:` then references `env.ADMINS_SPACE`. Both steps gated on `update-type == version-update:semver-major` so they only run when actually needed. ## Test plan - [ ] This PR's own Claude check: success (skip-gate catches the self-modification). - [ ] After merge, branch pushes no longer trigger the ghost `.github/workflows/dependabot-automerge.yml push failure` runs. - [ ] Next major-version Dependabot PR: both admins assigned correctly via `ADMINS_SPACE`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
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.
What's happening
When Claude review runs on a PR push, it ends by posting a sticky review comment. That comment fires an
issue_comment createdwebhook, which re-fires theClaude PR reviewworkflow. The new run is in the same concurrency group as the still-in-flight pull_request run, socancel-in-progress: truecancels the original — while it's still finalising the comment it just posted. The new run then evaluates the job-levelif:(comment body doesn't contain @claude or /review) and skips, but the damage is done: the original run shows ascancelledon the PR and any post-comment cleanup the action wanted to do gets cut.Observed on PR #7:
25736516663(pull_request, 13:08:39) → cancelled25736559325(issue_comment, 13:09:26) → skipped (no @claude//reviewmatch)Fix
Make
cancel-in-progressan expression:${{ github.event.sender.type != 'Bot' }}./review→sender.type == 'User'→cancel-in-progress: true→ stale run cancelled, same as before.issue_comment→sender.type == 'Bot'→cancel-in-progress: false→ the in-flight run finishes; the bot-triggered run still gets filtered out at the job-levelif:and skips harmlessly.Test plan
success(notcancelled)./reviewwhile a review is in progress → still cancels (intended — user explicitly asked).🤖 Generated with Claude Code