Repository navigation
refactor(review): one finalize module for the result tail (#648) - #650
Merged
Merged
Conversation
This was referenced Oct 15, 2026
Replace six hand-copied versions of severity filtering, should_block, quality gate, exit code, debt snapshot and review history (review single and chunked, commit, scan, MCP, engine fallback) with engine::finalize. MCP review_diff now honors min_severity and gates on the reported findings; commit records its review in the history. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
ajianaz
force-pushed
the
refactor/648-finalize
branch
from
October 15, 2026 05:06
1f280f4 to
74d512d
Compare
This was referenced Oct 15, 2026
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 #648. Part 1/6 of the agent-as-reviewer series (map in the issue comments).
What
New
engine::finalize:shape/shape_issues(severity filter,should_block, quality gate, exit code),blocks,exit_code,save_debt,save_history. Review (single + chunked), commit, scan, MCP and the engine fallback call it instead of re-implementing the tail.Why
The same result-shaping logic was copied in 6 places and had drifted: the MCP gate ignored severity, commit skipped history, chunked review recomputed
should_blocktwice. This is the single tail the laterjudgeseam (#649) plugs into.Behavior
Unchanged for
cora reviewandcora scan. Two intentional fixes:cora.review_diffhonorsmin_severityand gates on the reported findings.cora commitnow saves its review to the history (command = commit).Testing
cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo test(1135 passed; 11 newfinalizetests; the exit-code tests moved there).--ci=2; scan default=0, block=2.