Fix #63: Fail CI when review does not complete (e.g. token limit)#64
Open
VishaalChandrasekar0203 wants to merge 1 commit intoanthropics:mainfrom
Open
Conversation
…g. token limit) When review_completed is false and files_reviewed is 0, log to stderr, emit structured error to stdout, and exit with EXIT_GENERAL_ERROR so the step fails and the run is visible in CI instead of silently passing. Co-authored-by: Cursor <cursoragent@cursor.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.
Summary
When the audit hits token limits or returns truncated output, the action can still exit 0 with empty findings and
review_completed: false, so CI passes and users get no signal that the review didn't complete (issue #63).This change fails the step when no files were reviewed so the run is visible in CI and logs.
Changes (Python only)
claudecode/github_action_audit.py: After a successful audit run, ifanalysis_summary.review_completedis false andfiles_reviewedis 0, log a clear warning to stderr, emit a structured error to stdout, and exit withEXIT_GENERAL_ERRORso the step fails.claudecode/test_main_function.py: Addtest_incomplete_review_fails_stepto assert this behavior.Testing
analysis_summarywithfiles_reviewed> 0 or omitreview_completed, which defaults to true).Fixes #63