altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

review: bare `--no-ai` flag triggers help path instead of running the review

Open sahrizvi opened this issue 4 months ago • 1 comments

Bug

Running altimate-code review --no-ai <any other flag> prints the yargs help text and exits 0 without running the review. Only --no-ai=true (explicit boolean form) works as documented.

Reproduce

cd <any git repository>
altimate-code review --no-ai --json

Exits 0 with the review command's help text on stderr; no verdict envelope printed on stdout.

Expected

--no-ai should disable the advisory LLM reviewer lane and run the deterministic review, matching the flag's documented behavior:

--no-ai   disable the advisory LLM reviewer lane (no model calls / cost)
                                                    [boolean] [default: false]

Root cause

The review command is declared with .option("no-ai", { type: "boolean", default: false }) in packages/opencode/src/cli/cmd/review.ts. yargs' automatic --no-<option> shorthand handling treats bare --no-ai as "set undeclared option ai to false", which produces an argv object with no noAi field and — combined with the other declared options — trips a validation path that renders help and exits successfully.

Impact

Any invocation intending to disable the LLM lane via --no-ai (as documented in --help) silently no-ops. Because the exit code is 0, callers cannot detect the failure. Scripts / CI configurations using --no-ai to keep review cost predictable actually run with the AI lane enabled and pay full model cost.

Suggested fix

Set .parserConfiguration({ "boolean-negation": false }) on the review command's yargs builder. --no-ai then binds to the declared noAi option as authored. --no-ai=true / --no-ai=false continue to work for programmatic parity.

PR forthcoming.

sahrizvi avatar Jul 21 '26 05:07 sahrizvi

Resolved in v0.9.3 — published to npm as @altimateai/[email protected] (2026-07-23).

sahrizvi avatar Jul 23 '26 22:07 sahrizvi