Repository navigation
feat(mcp): agent-as-reviewer tools and a cora-review skill (#647) - #655
Merged
Merged
Conversation
…w_diff runtime panic (#647) cora.review_prepare/review_finalize and cora.scan_prepare/scan_finalize let the calling agent be the judge with no LLM configured in cora. Finalize is stateless and validates the agent's findings through judge::admit. cora install also installs a /cora-review skill for Claude Code. Also fixes cora.review_diff panicking with 'Cannot start a runtime from within a runtime': handlers now block via block_in_place. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
ajianaz
force-pushed
the
feat/647-agent-reviewer
branch
from
October 15, 2026 05:35
ad965e0 to
1bab72d
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 #647. Part 6/6. Stacked on #654 (#646) → #653 (#645) → #652 (#644) → #651 (#649) → #650 (#648): earlier commits here are those PRs; the diff shrinks as they merge.
What
cora.review_prepare(hardened prompts,valid_files, deterministic findings, response schema),cora.review_finalize(merge + validate + rules + gate + verdict),cora.scan_prepare(paged by batch, path restricted to the project) andcora.scan_finalize. Stateless: finalize recomputes the deterministic half from the same diff/path, so there is no packet id to expire or poison.judge::admit(security(review): treat judge output as untrusted input; self-contained Packet; correct cache key #644):rule_idcleared, text and count bounded, files/lines outside the diff dropped. A newAgentJudgeadapter plugs into the samereview_withpipeline; no cache in agent mode.cora installalso installs a/cora-reviewskill for Claude Code (~/.claude/skills/cora-review/SKILL.md; a customized copy is kept unless--force;--removedeletes it).docs/usage.md("Review with your agent") incl. the security model; tool list indocs/configuration.md.Also fixed (found by the end-to-end run)
cora.review_diffhas always panicked in the real MCP server: "Cannot start a runtime from within a runtime" (confirmed on currentdevelop), because handlers block on a second runtime from a#[tokio::main]runtime thread. All handlers now go through ablock_onhelper usingblock_in_place; its unit tests never hit that path, so there are regression tests that run on a multi-thread runtime.Why
Asking users to configure an LLM first is too much friction. An agent can review with its own model; cora supplies the deterministic checks, the prompts, and the validation.
Testing
cargo fmt --check,cargo clippy --all-targets --features tree-sitter -- -D warnings,cargo test --features tree-sitter(1187 passed; new: 13 agent-tool tests incl. hostile output, path escape, runtime-thread regression; 5 skill-install tests).HOMEand no API key, acting as the agent: prepare → finalize merged my finding, cleared a forgedrule_id, dropped/etc/passwd, kept the deterministic findings; scan prepare/finalize worked;path: "/"refused.Notes
--no-llm) or HTTP-LLM, especially for fork PRs.Security Audit (CVE)job fails on every PR right now (RUSTSEC unmaintainedunsafe-libyaml, yankedchacha20).