Skip to content

fix(mcp): report capped deterministic findings to the agent (not_shown) - #659

Merged
ajianaz merged 1 commit into
developfrom
fix/agent-finalize-report-capped-findings
Oct 15, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/agent-finalize-report-capped-findings

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

What

cora.review_prepare lists every deterministic finding, but cora.review_finalize shows only rules_engine.max_findings (default 5) of them and said nothing about the rest. Now:

  • review_prepare returns deterministic_findings_total and a note about the cap.
  • review_finalize, scan_finalize and cora.review_diff return not_shown (and a note naming the setting).

Why

Found by running a real agent (claude -p, cora with no LLM) on a real project (uteke, commit 09fb50b, a 25 KB security-sensitive diff): prepare reported 8 findings, finalize returned 5, and the agent could not explain the gap (3 bug-unwrap hits were silently capped). The CLI already warns on stderr; the MCP tools did not.

Testing

  • cargo fmt --check, cargo clippy --all-targets --features tree-sitter -- -D warnings, cargo test --features tree-sitter (1212 passed; new: 7 TODO findings, cap 5 → total 7, shown 5, not_shown 2).
  • Re-ran the same real-agent review on uteke: it now reports 8 → 5 with 3 not shown and the reason.

review_prepare listed all deterministic findings but review_finalize
showed only rules_engine.max_findings of them with no explanation, found
by running a real agent on a real project. prepare now reports the total
and the cap; finalize, scan_finalize and review_diff report not_shown.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
@ajianaz
ajianaz merged commit 7cfdd50 into develop Oct 15, 2026
14 checks passed
@ajianaz
ajianaz deleted the fix/agent-finalize-report-capped-findings branch October 15, 2026 07:23
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.

1 participant