fix(cli): apply the review and scan flags that were accepted and ignored - #1431
Merged
Conversation
Three flags parsed cleanly, changed nothing, and gave no sign of it. `buddy scan --strategy patch --packages react` folded `--strategy` into the config and listed the major anyway. The full scan filters by strategy; the `--packages` and `--pattern` paths called the registry client directly and returned whatever it found. Both now pass through the same `filterUpdatesByStrategy` the scan uses, so the three entry points agree. `buddy review <pr> --format json` and `--fail-on major` were accepted on the pull request path and applied only on the local one. The pull request branch delegated to `runReviewForPR`, which returns a status line β enough for an `@buddy review` reply, not enough to render findings or gate an exit code, so the findings never reached the command and both flags fell through. `reviewPullRequest` now returns the status and the review together, and `runReviewForPR` is the string form of it, so the comment path is unchanged. The CLI renders the result when a format other than `pretty` is asked for and exits non-zero when `--fail-on` matches β the review is posted to the pull request regardless; the flags govern what the terminal sees and what the process returns, which is what lets `buddy review 123 --fail-on major` gate a pipeline on the review it just left. The test fixture is worth a note: the engine reads `response.json`, not `response.text`, so a stub that returns only text produces a review with no findings β indistinguishable from "nothing to report". The existing fixture in that file had been passing for exactly that reason. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UWouahBJT3msK7V2VDYY6T
This was referenced Aug 29, 2026
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.
Three flags parsed cleanly, changed nothing, and gave no sign of it.
buddy scan --strategywith--packages/--patternfolded
--strategyinto the config and listed the major anyway. The full scan filters by strategy; the targeted paths called the registry client directly and returned whatever it found. All three entry points now sharefilterUpdatesByStrategy.buddy review <pr> --formatand--fail-onAccepted on the pull request path, applied only on the local one. The PR branch delegated to
runReviewForPR, which returns a status string β enough for an@buddy reviewreply, not enough to render findings or gate an exit code. So the findings never reached the command and both flags fell through silently.reviewPullRequestnow returns{ status, result };runReviewForPRis the string form, so the comment path is untouched. The CLI renders when a format other thanprettyis asked for, and exits non-zero when--fail-onmatches.The review is posted regardless β the flags govern what the terminal sees and what the process returns. That's what lets
buddy review 123 --fail-on majorgate a pipeline on the review it just left, which the docs now say.A fixture note worth keeping
The engine reads
response.json, notresponse.text. A stub returning only text produces a review with no findings β indistinguishable from "nothing to report." The existing fixture inreview-parity.test.tshad been passing for exactly that reason. Same shape as theautoMigratefixture in #1423: a test that can't tell the feature from its absence.Tests
2153 β 2160.
Lint β Β· typecheck β Β·
check:docsβ Β· 0 failπ€ Generated with Claude Code
https://claude.ai/code/session_01UWouahBJT3msK7V2VDYY6T