Context
GET /v1/app/skipped-pr-audit (src/api/routes.ts) already exists and returns a paginated audit trail of listPrVisibilitySkipAuditEvents — PRs the automated review pipeline decided NOT to visibly review/comment on, with a reason code, optional repoFullName/reason/since filters, and role-scoped repo visibility. It requires maintainer/owner/operator role (getRoleSummaryForIdentity + a role check), the same general authenticated-identity + role-check shape already used by other maintainer-facing MCP tools — it is measurement-only, no mutation, purely an audit read.
This is a distinct capability from every other already-exposed maintainer tool: loopover_get_maintainer_noise reports queue-noise triage, loopover_get_gate_precision reports blocked-then-merged false-positive rates, loopover_get_repo_outcome_patterns/loopover_get_outcome_calibration report gate-decision accuracy — none of them cover why a specific PR was silently skipped by the reviewer, which is exactly what /v1/app/skipped-pr-audit was built for (#105, "add silent audit export for skipped PRs"; consumed today by the #792 UI audit-feed viewer). A maintainer using an MCP client to triage "did the bot actually look at PR #N, and if not, why" currently has no tool for it and must open the dashboard.
Requirements
- Add a new tool
loopover_get_skipped_pr_audit to src/mcp/server.ts, following the "maintainer-authenticated; measurement only" pattern already used by loopover_get_maintainer_noise / loopover_get_gate_precision.
- Input schema: optional
repoFullName (string), optional reason (string, matching the route's own filter), optional since (string/date, matching the route's since query param), optional limit (integer, clamped the same way the route clamps it — 1 to 100, default 50).
- Implementation: call the existing
listPrVisibilitySkipAuditEvents service function directly with the same repo-scope resolution the route already performs for the caller's role (do not reimplement the role-based repo-scoping logic in skippedPrAuditRepoScope — reuse it), rather than an internal HTTP round-trip.
- Description text: state plainly this is maintainer-authenticated, read-only, and reports PRs the automated reviewer skipped (with reason codes) — not a moderation or override action.
- Add an output schema following the file's structured-output convention.
Deliverables
Test Coverage Requirements
99%+ Codecov patch coverage on every changed line and branch in src/mcp/server.ts for the new tool handler, including every filter branch and the forbidden-role branch.
Expected Outcome
An MCP client authenticated as a maintainer can call loopover_get_skipped_pr_audit (optionally filtered by repo/reason/since) and get the same skipped-PR audit trail GET /v1/app/skipped-pr-audit already returns, without needing direct REST/API access or the dashboard.
Links & Resources
Context
GET /v1/app/skipped-pr-audit(src/api/routes.ts) already exists and returns a paginated audit trail oflistPrVisibilitySkipAuditEvents— PRs the automated review pipeline decided NOT to visibly review/comment on, with a reason code, optionalrepoFullName/reason/sincefilters, and role-scoped repo visibility. It requires maintainer/owner/operator role (getRoleSummaryForIdentity+ a role check), the same general authenticated-identity + role-check shape already used by other maintainer-facing MCP tools — it is measurement-only, no mutation, purely an audit read.This is a distinct capability from every other already-exposed maintainer tool:
loopover_get_maintainer_noisereports queue-noise triage,loopover_get_gate_precisionreports blocked-then-merged false-positive rates,loopover_get_repo_outcome_patterns/loopover_get_outcome_calibrationreport gate-decision accuracy — none of them cover why a specific PR was silently skipped by the reviewer, which is exactly what/v1/app/skipped-pr-auditwas built for (#105, "add silent audit export for skipped PRs"; consumed today by the#792UI audit-feed viewer). A maintainer using an MCP client to triage "did the bot actually look at PR #N, and if not, why" currently has no tool for it and must open the dashboard.Requirements
loopover_get_skipped_pr_audittosrc/mcp/server.ts, following the "maintainer-authenticated; measurement only" pattern already used byloopover_get_maintainer_noise/loopover_get_gate_precision.repoFullName(string), optionalreason(string, matching the route's own filter), optionalsince(string/date, matching the route'ssincequery param), optionallimit(integer, clamped the same way the route clamps it — 1 to 100, default 50).listPrVisibilitySkipAuditEventsservice function directly with the same repo-scope resolution the route already performs for the caller's role (do not reimplement the role-based repo-scoping logic inskippedPrAuditRepoScope— reuse it), rather than an internal HTTP round-trip.Deliverables
loopover_get_skipped_pr_audittool registration insrc/mcp/server.tsrepoFullName,reason,since), thelimitclamping boundaries, the empty-result case, and the non-maintainer-caller-forbidden casemaintainer-triageprofile'srecommendedToolslist inpackages/loopover-mcp/bin/loopover-mcp.js(AGENT_PROFILES), whose stated purpose ("Summarize queue risk, prepare review notes...") already covers this use caseTest Coverage Requirements
99%+ Codecov patch coverage on every changed line and branch in
src/mcp/server.tsfor the new tool handler, including every filter branch and the forbidden-role branch.Expected Outcome
An MCP client authenticated as a maintainer can call
loopover_get_skipped_pr_audit(optionally filtered by repo/reason/since) and get the same skipped-PR audit trailGET /v1/app/skipped-pr-auditalready returns, without needing direct REST/API access or the dashboard.Links & Resources
loopover_get_maintainer_noiseandloopover_get_gate_precisioninsrc/mcp/server.ts(same "maintainer-authenticated; measurement only" class of tool)listPrVisibilitySkipAuditEvents,skippedPrAuditRepoScope,skippedPrAuditQuerySchemainsrc/api/routes.ts, routeGET /v1/app/skipped-pr-audit