Skip to content

feat(mcp): add loopover_get_pr_reviewability tool on both MCP servers - #6222

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
lourincedaging0-commits:feat/mcp-pr-reviewability-tool
Jul 15, 2026
Merged

feat(mcp): add loopover_get_pr_reviewability tool on both MCP servers#6222
JSONbored merged 1 commit into
JSONbored:mainfrom
lourincedaging0-commits:feat/mcp-pr-reviewability-tool

Conversation

@lourincedaging0-commits

Copy link
Copy Markdown
Contributor

Summary

The GET /v1/repos/:owner/:repo/pulls/:number/reviewability route is already MCP-auth-aware (isMcpReadRepoAllowed, the same repo-allowlist gate /intelligenceloopover_get_repo_context and /issue-qualityloopover_get_issue_quality use) but had no tool on either server. This wires it up.

  • Remote server (src/mcp/server.ts): adds loopover_get_pr_reviewability, mirroring loopover_get_issue_quality exactly — same canAccessRepo gate, cached-snapshot-then-compute (serving the persisted pr-reviewability snapshot the route already writes), same freshnessResponseOutputSchema. Reuses the existing loadContributorFastContext loader and calls the same buildPullRequestReviewability the route does, with identical inputs.
  • Local server (packages/loopover-mcp): adds the equivalent apiGet proxy tool; bumps the stdio tool-count invariant to 42.
  • Tests: server-level (forbidden / not_found / cached-snapshot / two timestamp fallbacks / computed-with-contributor / computed-no-author) and a stdio-proxy test; the harness gets a reviewability fixture route.

Response shape matches the loopover_get_issue_quality wrapper; no new response shape invented.

Closes #6154.

The GET /v1/repos/:owner/:repo/pulls/:number/reviewability route is already
MCP-auth-aware (isMcpReadRepoAllowed, same gate as /intelligence and
/issue-quality) but had no tool on either server. Adds
loopover_get_pr_reviewability to the remote server, mirroring
loopover_get_issue_quality's cached-snapshot-then-compute pattern and reusing
the existing contributor-fast-context loader, plus the equivalent apiGet proxy
tool on the local stdio server. Bumps the stdio tool-count invariant 37->38.

Closes JSONbored#6154.
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 15, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.32%. Comparing base (b326745) to head (6f4713b).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6222   +/-   ##
=======================================
  Coverage   95.32%   95.32%           
=======================================
  Files         596      596           
  Lines       47110    47129   +19     
  Branches    15016    15021    +5     
=======================================
+ Hits        44908    44927   +19     
  Misses       1477     1477           
  Partials      725      725           
Flag Coverage Δ
shard-1 44.00% <10.52%> (-0.02%) ⬇️
shard-2 36.54% <10.52%> (-0.02%) ⬇️
shard-3 32.32% <10.52%> (+0.13%) ⬆️
shard-4 33.74% <10.52%> (-0.36%) ⬇️
shard-5 32.19% <10.52%> (+0.49%) ⬆️
shard-6 44.99% <100.00%> (-0.28%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/mcp/server.ts 96.29% <100.00%> (+0.07%) ⬆️

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 15, 2026
@loopover-orb

loopover-orb Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Important

🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪

🔍 LoopOver is reviewing…

AI analysis is in progress. This comment will update when the review is complete.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟪 Reviewing

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@JSONbored
JSONbored merged commit d64f887 into JSONbored:main Jul 15, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(mcp): add an MCP tool for GET /v1/repos/:owner/:repo/pulls/:number/reviewability (route already MCP-auth-aware, no tool on either server)

2 participants