feat(mcp): expose submitted PR AI-review findings via MCP#4532
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-10 00:19:19 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 6 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4532 +/- ##
=======================================
Coverage 94.04% 94.05%
=======================================
Files 422 423 +1
Lines 37574 37632 +58
Branches 13724 13746 +22
=======================================
+ Hits 35335 35393 +58
Misses 1583 1583
Partials 656 656
🚀 New features to boost your workflow:
|
Closes #4519
Summary
Adds
gittensory_get_pr_ai_review_findings, a post-submission MCP tool that returns a contributor's own published AI-review inline findings as structured JSON (category,path,severity,line,body) — the same categorization used in the PR comment's "Finding categories" collapsible.Persists
inlineFindingsinai_review_cache.metadata_jsonwhen a fresh review is cached so MCP can read them back after publish.Motivation
Pre-submission tools (
gittensory_predict_gate,gittensory_explain_gate_disposition, staticgittensory_finding_taxonomy) never expose the real dual-AI-review inline findings on an already-submitted PR. Miners blocked by a consensus defect or reviewer-disagreement HOLD only had PR-comment prose to parse. This closes the gap for a future iterate loop (#2333/#2334).Changes
src/mcp/pr-ai-review-findings.tssrc/mcp/server.tsgittensory_get_pr_ai_review_findingswith contributor + repo access scopingsrc/queue/processors.tsinlineFindingsin review cache metadata on fresh reviewssrc/db/repositories.tsheadShafromgetLatestPublishedAiReviewsrc/services/subnet-interface.ts.claude/skills/.../reference.mdtest/unit/pr-ai-review-findings.test.ts,test/unit/mcp-pr-ai-review-findings.test.tsMCP tool
Name:
gittensory_get_pr_ai_review_findingsInput:
{ login, owner, repo, pullNumber }Output:
{ "status": "ready", "repoFullName": "acme/widgets", "pullNumber": 42, "login": "miner1", "headSha": "sha-reviewed", "findings": [ { "category": "security", "path": "src/db.ts", "severity": "blocker", "line": 12, "body": "This is vulnerable to SQL injection." } ], "categoryCounts": { "security": 1, "correctness": 1 } }Status values:
ready— published review found (findings may be empty)not_found— no published AI review for this PRai_review_off— repo has AI review disabledAccess:
requireContributorAccess(login)+requireRepoAccess(owner/repo)+ PR author must matchlogin.Test plan
npx vitest run test/unit/pr-ai-review-findings.test.ts test/unit/mcp-pr-ai-review-findings.test.tscategoryCountsmatchbuildFindingCategoryCollapsiblefor the same findingsnpm run test:cibefore pushnpm run test:coverage— 99% patch on changedsrc/**linesNotes
published_atset).inlineFindingsmetadata → tool returnsreadywith an empty findings array until the PR is re-reviewed.