Skip to content

Fix #63: Fail CI when review does not complete (e.g. token limit)#64

Open
VishaalChandrasekar0203 wants to merge 1 commit intoanthropics:mainfrom
VishaalChandrasekar0203:fix-63-incomplete-review-fail
Open

Fix #63: Fail CI when review does not complete (e.g. token limit)#64
VishaalChandrasekar0203 wants to merge 1 commit intoanthropics:mainfrom
VishaalChandrasekar0203:fix-63-incomplete-review-fail

Conversation

@VishaalChandrasekar0203
Copy link
Copy Markdown

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, if analysis_summary.review_completed is false and files_reviewed is 0, log a clear warning to stderr, emit a structured error to stdout, and exit with EXIT_GENERAL_ERROR so the step fails.
  • claudecode/test_main_function.py: Add test_incomplete_review_fails_step to assert this behavior.

Testing

  • New unit test covers the incomplete-review path.
  • No change to the happy path (existing tests use analysis_summary with files_reviewed > 0 or omit review_completed, which defaults to true).

Fixes #63

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running security review on Github Actions doesn't result in PR comments OR any output

1 participant