Skip to content

fix(cli): apply the review and scan flags that were accepted and ignored - #1431

Merged
glennmichael123 merged 1 commit into
mainfrom
fix/cli-flag-noops
Aug 31, 2026
Merged

fix(cli): apply the review and scan flags that were accepted and ignored#1431
glennmichael123 merged 1 commit into
mainfrom
fix/cli-flag-noops

Conversation

@glennmichael123

Copy link
Copy Markdown
Member

Three flags parsed cleanly, changed nothing, and gave no sign of it.

buddy scan --strategy with --packages / --pattern

buddy scan --strategy patch --packages react

folded --strategy into 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 share filterUpdatesByStrategy.

buddy review <pr> --format and --fail-on

Accepted 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 review reply, not enough to render findings or gate an exit code. So the findings never reached the command and both flags fell through silently.

reviewPullRequest now returns { status, result }; runReviewForPR is the string form, so the comment path is untouched. The CLI renders when a format other than pretty is asked for, and exits non-zero when --fail-on matches.

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 major gate a pipeline on the review it just left, which the docs now say.

A fixture note worth keeping

The engine reads response.json, not response.text. A stub returning only text produces a review with no findings β€” indistinguishable from "nothing to report." The existing fixture in review-parity.test.ts had been passing for exactly that reason. Same shape as the autoMigrate fixture 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

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
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.

1 participant