Make claude-review tolerant of missing structured_output#12
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Member
Author
Live-tested on a real Dependabot PRTested this branch's build against epic-roadtrip-planner-webapp #1657 (jest-dom 6→7, a major → triggers review), run
Root cause confirmed: it was Caveat to decide: in automation mode the model returns the structured verdict but no longer posts the rich human-readable review comment — the verdict now lives in the job summary + the pass/fail gate. If we want the comment back, the follow-up is to add a |
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.
Problem
The
claude-reviewjob'sanalyzestep (anthropics/claude-code-actionwith--json-schema) intermittently exits 1 with:Result subtype: successmeans the compatibility assessment itself ran fine — only the machine-readable structured-output capture failed (anthropics/claude-code#23265). Because every GitHub Actions re-run is a fresh process (a fresh "first invocation"), re-running never escapes it, so this redsclaude-reviewon Dependabot PRs across all caller repos even when the update is fine.Bumping the action to v1.0.182 did not fix it — verified on
epic-roadtrip-planner-webapprun30139938013, which usedclaude-code-action@e0cf66d1(v1.0.182) and still failed with the same error and no verdict.Fix
Make the plumbing failure non-blocking while preserving the real verdict gate:
continue-on-error: trueon theanalyzestep, so the action exiting 1 on a missingstructured_outputno longer fails the job.structured_outputas advisory — posts a note pointing at Claude's PR comment and exits 0 — but a valid object with a non-PASSrecommendation still exits 1 and reds the check.Net effect:
PASSverdictFAIL/NEEDS REVIEWverdictThe check is advisory anyway — the branch rulesets require only
build (24.x)+workflow-lint.Trade-off to weigh
When the assessment can't emit structured output, we now go green and rely on the posted PR comment for the human signal. If you'd rather the check stay red until the upstream action bug is fixed, don't merge — but note it reproduces on essentially every Dependabot PR today.
🤖 Generated with Claude Code