Repository navigation
refactor(review): prepare / judge / finalize with the LLM as the seam (#649) - #651
Merged
Merged
Conversation
This was referenced Oct 15, 2026
…#649) review::prepare builds a judge::Packet, a Judge returns findings (HttpJudge = today's LLM call, NoJudge = deterministic only), and review::review_with merges, guards paths, post-processes and decides should_block. The pipeline now has end-to-end tests with a fake judge. Spinners move out of the llm module into progress::Spinner. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
ajianaz
force-pushed
the
refactor/649-judge-seam
branch
from
October 15, 2026 05:12
c028989 to
c5ea582
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #649. Part 2/6. Stacked on #650 (#648): the first commit here is that PR; the diff shrinks once #650 is merged and this is rebased.
What
review_diff_inner(~300 lines) becomes three steps with the LLM as the seam:review::prepare(config, diff, memory, bridge) -> judge::Packet(judge-visible text, assembled context, system prompt override,valid_files, diff chunks, deterministic findings).judge::Judgetrait:HttpJudge(today's LLM call, incl. streaming),NoJudge(deterministic only, used by feat(cli): run review/scan without an API key (select_judge; deterministic-only mode with notice) #646 later).review::review_with(judge, config, packet): merge deterministic findings, hallucinated-path guard, postprocess,should_block, judge-failure fallback.llm::review_diff/llm::scan_filestake an events observer (like the stream variant); spinners moved toprogress::Spinner, so thellmmodule no longer prints.Why
Context assembly, the LLM call, merge and postprocess lived in one function that built
HttpTransportinline, so review had no end-to-end test and no way to swap the judge. Two adapters (HTTP, none) now justify a real seam; the agent adapter (#647) plugs in later.Testing
cargo fmt --check,cargo clippy --all-targets --features tree-sitter -- -D warnings,cargo test --features tree-sitter(1142 passed; 7 new tests drive the pipeline with a fake judge: merge, path guard, should_block threshold, judge failure with/without deterministic findings,NoJudge).--stream, cache hit (0.27s), andscanall behave as before.