Skip to content

fix(scan): run the same deterministic family as review; scan judge seam (#645) - #653

Merged
ajianaz merged 1 commit into
developfrom
fix/645-scan-deterministic-family
Oct 15, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/645-scan-deterministic-family

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

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

What

  • deterministic::run_files(files, config): rules + secrets + security over whole files, the counterpart of deterministic::run for diffs. postprocess (Source::Files) uses it, so cora scan and MCP cora.check_snippet now run the rules engine (built-in and custom rules), which scan silently skipped.
  • judge::ScanJudge (HttpScanJudge, NoJudge) and judge_batches in commands/scan.rs: the batch loop no longer needs a network to be tested.
  • DEFAULT_BATCH_TOKEN_BUDGET → DEFAULT_BATCH_CHAR_BUDGET (it always measured characters).
  • docs/cli-reference.md states what scan runs and which review flags it does not have (--ci, --severity, --quiet, --stream, --output-file, --no-cache, quality gate).

Why

Rules reached cora review only. Scan owned a private copy of the deterministic orchestration and was untestable without a live LLM.

Testing

  • cargo fmt --check, cargo clippy --all-targets --features tree-sitter -- -D warnings, cargo test --features tree-sitter (1162 passed; new: rules fire in scan, disabled engine stays off, judge batch admitted/skipped/aborted, NoJudge).
  • Manual with a real LLM on a sample dir (py + rs): scan output as before; deterministic path covered by unit tests.
  • Behavior change to note: scan can now report rule findings (e.g. bug-todo) that it previously never reported; rules_engine.enabled: false turns them off.

…am (#645)

deterministic::run_files serves whole files (scan, MCP snippet check) the
way run serves diffs, so built-in and custom rules now fire in scan.
ScanJudge (HttpScanJudge, NoJudge) makes the batch loop testable without
a network. DEFAULT_BATCH_TOKEN_BUDGET is renamed to CHAR_BUDGET and the
docs state which review flags scan lacks.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
@ajianaz
ajianaz force-pushed the fix/645-scan-deterministic-family branch from 1537e11 to 1c8bccb Compare October 15, 2026 05:24
@ajianaz
ajianaz merged commit 9e60046 into develop Oct 15, 2026
14 checks passed
@ajianaz
ajianaz deleted the fix/645-scan-deterministic-family branch October 15, 2026 05:28
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.

fix(scan): run the same deterministic family as review (rules engine was skipped)

1 participant