fix(review): exit non-zero when a partial run has real item failures - #1254
Open
HoneyTyagii wants to merge 1 commit into
Open
HoneyTyagii wants to merge 1 commit into
HoneyTyagii wants to merge 1 commit into
Conversation
Contributor
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 3 selected item(s). |
rajpratham1
suggested changes
Sep 14, 2026
rajpratham1
left a comment
There was a problem hiding this comment.
The new exit-code behavior is directionally correct, but the process status now depends on nonBudgetFailures() treating every non-FailureBudget classification as a real failure. Since this changes the CLI/CI contract, please add coverage for the other possible failure classifications and verify that only controlled budget truncation returns 0 for a partial run. After those cases are covered, this should be ready to merge.
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
Fixes #1027.
ocr reviewexits 0 on a partial run (some items completed, some failed with timeout/provider errors), so CI cannot detect an incomplete review or a misconfigured harness from the exit status alone. The GitHub Action then skips posting (Post review commentsgates onOCR_EXIT_CODE == '0') while the job stays green.Change
reviewResultError(cmd/opencodereview/review_cmd.go): apartialmanifest whose failed set contains any non-budget item now returns an error, so the run exits non-zero. Budget-only partials (the documented--max-tokens-budgetcontrolled-truncation contract) keep exiting 0. Partial results are still published before the non-zero exit, so JSON consumers keep the full coverage diagnosis.--max-tokens-budgetflag help, action.yml input description, and the exit-codes tables / FAQ entries across en/zh/ja/ko/ru pages.Verification
go build ./...,go vet ./cmd/...,gofmt -s -lcleango test ./cmd/... ./internal/session/...passes (LC_ALL=C)Fixes #1027