Skip to content

refactor(review): split deterministic analysis from the LLM call - #577

Merged
ajianaz merged 1 commit into
developfrom
refactor/review-deterministic-seam
Oct 7, 2026
Merged

ajianaz merged 1 commit into
developfrom
refactor/review-deterministic-seam

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

What

Extract the deterministic half of review_diff_inner into engine::deterministic, give the three index scanners one shared preamble, and route every ignore/skip/include/exclude match through one matcher (engine::path_match).

Why

Closes #569

How

  • deterministic::run(chunks, config, bridge) -> DeterministicReport (rules, secrets, security, index unused/dead/breaking, claim flags) with context(static) and merge_into(issues). review.rs keeps the LLM call and post-filters. Family order, context text and merge order are unchanged.
  • index_scanner::scan_changed_files: shared preamble (index handle, deleted/skip/additions/dedupe selection, max cap); only the per-file query differs.
  • path_match::PathMatcher: used by index walk, review scanners, cora scan include/exclude and cora watch --filter. Semantics are documented in the module. Intentional differences from the retired hand-rolled matcher: **/*.test.ts no longer matches footest.ts, vite.config.* no longer matches vite.configx, src/*.rs now matches. Slash-free scan/watch patterns now also match by basename.

Testing

  • cargo test --features tree-sitter passes
  • cargo fmt --all -- --check passes
  • cargo clippy --all-targets --features tree-sitter -- -D warnings passes
  • cargo build --release --features tree-sitter passes
  • New tests: deterministic module end to end with an in-memory IndexBridge (no LLM), shared preamble (deleted/skip/dedupe/cap/additions), matcher cases

Related Issues

Closes #569

🤖 Generated with Claude Code

Extract engine::deterministic::run (rules, secrets, security, index scans,
claim flags) returning a structured DeterministicReport with context() and
merge_into(), testable without an LLM. The three index scanners share one
scan_changed_files preamble. All ignore/skip/include/exclude matching now goes
through engine::path_match (index, review scanners, scan, watch).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
@ajianaz
ajianaz merged commit 1dd7ac4 into develop Oct 7, 2026
14 checks passed
ajianaz added a commit that referenced this pull request Oct 8, 2026
)

Covers security hardening (#563, #572, #573), fixes (#553, #561, #562,
#564, #565, #574-#576), and the ignore-pattern semantic changes from
#577 that can alter which files existing configs exclude.

Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
Co-authored-by: ajianaz <ajianaz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

refactor(review): split deterministic analysis from the LLM call in review_diff_inner

1 participant