Skip to content

feat(cli): run review/scan without an API key (select_judge, --no-llm) (#646) - #654

Merged
ajianaz merged 1 commit into
developfrom
feat/646-select-judge
Oct 15, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/646-select-judge

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #646. Part 5/6. Stacked on #653 (#645) → #652 (#644) → #651 (#649) → #650 (#648): earlier commits here are those PRs; the diff shrinks as they merge.

What

  • judge::JudgeChoice { Llm, Deterministic } and judge::select_judge: the judge is chosen once in cmd_review/cmd_scan. A missing API key (NoApiKey) selects Deterministic (stderr notice) instead of failing; other config errors still fail.
  • New --no-llm on cora review and cora scan: forces it, silent.
  • Output says so: summary "Deterministic checks only (no LLM judge)."; SARIF invocation gets cora.judge = "none" even with zero results.
  • review::review_diff_with_judge dispatches; review (single + chunked) and scan take a JudgeChoice. cora commit and MCP cora.review_diff keep requiring a key.

Why

LLM configuration was a precondition of every command, so a missing key killed the part that needs no LLM. First run, git hooks and key-less CI could not use cora at all.

Testing

  • cargo fmt --check, cargo clippy --all-targets --features tree-sitter -- -D warnings, cargo test --features tree-sitter (1169 passed; new: choose key/no-key/flag/other-error, deterministic scan blocks without a network, SARIF marker with and without results).
  • Manual: with an empty HOME and no CORA_* env, cora review/cora scan print the notice and find the secret and command injection (before: Error: no API key found); --no-llm is silent; SARIF shows cora.judge: none; with a key it still calls the LLM.
  • Note: exit codes are unchanged; a deterministic-only pass means "no deterministic finding", not "reviewed".

#646)

A missing API key now selects the deterministic judge instead of failing:
checks run, a stderr notice is printed, and the summary (and SARIF
invocation) says no LLM judged. --no-llm forces it. The judge is chosen
once at the entry point.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
@ajianaz
ajianaz force-pushed the feat/646-select-judge branch from a8f9228 to 8b44e4f Compare October 15, 2026 05:29
@ajianaz
ajianaz merged commit 6ace491 into develop Oct 15, 2026
14 checks passed
@ajianaz
ajianaz deleted the feat/646-select-judge branch October 15, 2026 05:34
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.

feat(cli): run review/scan without an API key (select_judge; deterministic-only mode with notice)

1 participant