fix: skip review on workflow-self-modification PRs (v2.0.1) - #57
Merged
twistedmelonman merged 1 commit intoApr 18, 2026
Merged
Conversation
…2.0.1) The anthropics/claude-code-action refuses to run on PRs that modify any workflow file in the caller repo — this is its by-design security feature (a PR can't modify the reviewer to hide its own issues). The action currently exits with a non-zero status after a ~30s workflow- validation retry loop, which our Check review verdict step interprets as 'exceeded turn limit' and exits 1. Consumer repos hit this on every caller-workflow edit: Dependabot auto-bumps of the @v2 pin, manual version bumps, added new workflows, etc. Observed on PR #1176 (kebab-tax), #70 (dotfiles), #40 (mac-dev-server- setup) during the v1→v2 rollout. Each required a manual bypass marker to merge. Dependabot-driven rollouts would need the bypass on EVERY auto-generated PR, which defeats the point of Dependabot. Detect the condition in the existing Check for doc-only diff step (already enumerates the PR's file list). If ANY .github/workflows/*.yml file is in the UNION of previous_filename and filename, short-circuit with VERDICT: SKIPPED (workflow-self-modification). The real v2 review then runs on the next non-workflow PR. This is a correctness fix, not a security regression: - The claude-code-action already cannot review such PRs (that's the security feature we're accommodating, not defeating). - Humans remain responsible for reviewing workflow changes manually. That was already true under v2.0.0. - A malicious workflow change would skip the review in both v2.0.0 and v2.0.1 — the failure mode is unchanged, only the verdict cleanliness differs. Workflow-self-modification detection runs BEFORE the doc-only check so that a mixed PR (doc + workflow) hits the more-specific workflow skip rather than falling through to non-doc review and then failing. Ship as v2.0.1 (PATCH — narrow bug fix). Consumer migration: none for @v2 floating-tag pinners; explicit-semver pinners who want the fix should bump to @v2.0.1. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
twistedmelonman
deleted the
claude/v2-0-1-workflow-self-mod-skip-20260418
branch
April 18, 2026 22:05
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.
Summary
Adds a PRIORITY SKIP case to the Check for doc-only diff step: if the PR modifies any
.github/workflows/*.ymlfile, short-circuit withVERDICT: SKIPPED (workflow-self-modification).Why
The
anthropics/claude-code-action@v1refuses to run on PRs that modify any workflow file in the caller repo (security feature — prevents a PR from modifying the reviewer to hide issues). The action currently exits non-zero after a 30s retry loop, which our Check review verdict step interprets as "exceeded turn limit" and fails the job.Observed in the v1 → v2 rollout:
Blocks the Dependabot-driven update pattern the user wants to adopt next: Dependabot PRs would need a bypass marker on every auto-generated PR. Not sustainable.
What changes
New logic in
claude-blocking-review.ymlline ~157, before the existing doc-only check:Uses the same file-list enumeration the doc-only check already does (UNION of
previous_filenameandfilename).Not a security regression
Migration
@v2): picked up automatically once v2 tag advances.@v2.0.0): bump to@v2.0.1to get the fix.This PR enables the planned rollout of Dependabot +
@v2.0.1specific pins across the 27 consumer repos.Test plan
.github/workflows/claude-blocking-review.yml— the self-review caller (self-review.yml) is unchanged, so the workflow-validation-skip should NOT fire and this PR should get a normal review (confirming the narrow-fix scope)🤖 Generated with Claude Code