Two-step claude-review: json-schema gate + track_progress comment#13
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Two-step claude-review: separate gate + comment
Fixes the
claude-review--json-schema … did not return structured_outputfailure. Root cause (confirmed on real Dependabot runs):track_progress: trueand--json-schemaare mutually exclusive execution modes in claude-code-action — set together (the prior config) the run returns no structured output and fails, and re-runs can't escape it.This splits the work into two claude-code-action calls, each in a supported mode:
--json-schema {recommendation, riskLevel}, notrack_progress→ the machine-readable PASS/FAIL verdict the summary step gates on.track_progress: true, no--json-schema→ posts the rich human-readable review comment.The summary step gates on step 1's structured output (non-
PASS→ red check) and no longer posts a comment. Defense-in-depth:continue-on-erroron the gate + an advisory guard if structured output is ever missing.Cost: two Claude calls per reviewed Dependabot PR (majors + uncertain-compat only; patches/minors with good compat auto-merge and skip review).
Validation
claude-code-action self-skips on any PR that edits a workflow file, so this can only be validated on a real Dependabot PR that doesn't touch workflows — not via a workflow-pin test branch (that self-skips and looks green while doing nothing). I'm validating on a live
@dependabot recreaterun before re-pinning the 13 callers.🤖 Generated with Claude Code