feat(mcp): expose skipped-PR audit trail as a maintainer MCP tool - #5905
Merged
Conversation
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
JSONbored
marked this pull request as draft
July 14, 2026 22:26
nghetienhiep
force-pushed
the
fix/issue-5825
branch
from
July 14, 2026 22:31
83f458f to
05d4083
Compare
Contributor
|
Warning LoopOver found maintainer review notesScoped related-work signals were found for this PR. They are advisory unless the gate reports a blocker. Readiness score: 57/100
Signal definitions
Review context
Maintainer notes
Contributor next steps
💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers. |
This was referenced Jul 14, 2026
JSONbored
force-pushed
the
fix/issue-5825
branch
from
July 15, 2026 00:18
05d4083 to
0392e6e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5905 +/- ##
=======================================
Coverage 95.15% 95.16%
=======================================
Files 589 589
Lines 46695 46723 +28
Branches 14902 14913 +11
=======================================
+ Hits 44434 44462 +28
Misses 1511 1511
Partials 750 750
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Add loopover_get_skipped_pr_audit, mirroring GET /v1/app/skipped-pr-audit's maintainer-authenticated, repo-scoped, filterable read of PRs the automated reviewer intentionally skipped. Extract the shared reason enum and remediation text out of routes.ts into signals/settings-preview.ts so the route and the new tool stay in lockstep instead of duplicating the list. Closes JSONbored#5825
JSONbored
force-pushed
the
fix/issue-5825
branch
from
July 15, 2026 02:03
523a35b to
6e059b0
Compare
JSONbored
marked this pull request as ready for review
July 15, 2026 04:26
JSONbored
approved these changes
Jul 15, 2026
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.
Summary
loopover_get_skipped_pr_audit, a maintainer-authenticated, read-only MCP tool that surfaces the same skipped-PR audit trail already exposed byGET /v1/app/skipped-pr-audit(listPrVisibilitySkipAuditEvents), so an MCP client can triage "did the bot look at PR #N, and if not, why" without the dashboard.PUBLIC_SURFACE_SKIP_REASONS) and the per-reason remediation text (skippedPrAuditRemediation) out ofsrc/api/routes.tsintosrc/signals/settings-preview.ts(next toPublicSurfaceSkipReason) so the HTTP route and the new MCP tool consume one canonical copy instead of two independently-maintained literal lists.maintainer-triageMCP agent profile'srecommendedTools.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Closes #5825
Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
ui:lint/ui:typecheck/ui:buildwere skipped: this PR touches no files underapps/loopover-ui/**— the only production files changed aresrc/api/routes.ts,src/mcp/server.ts,src/signals/settings-preview.ts, andpackages/loopover-mcp/bin/loopover-mcp.js.npm run ui:openapi:checkpassed with no drift, confirming the (unchanged)/v1/app/skipped-pr-auditrequest/response shape still matches the generated OpenAPI spec.npm run db:migrations:check,npm run db:schema-drift:check,npm run selfhost:env-reference:check,npm run miner:env-reference:check,npm run cf-typegen:check,npm run manifest:drift-check,npm run command-reference:check,npm run docs:drift-check,npm run engine-parity:drift-check,npm run test:engine-parity,npm run test:live-gate-parity,npm run test:driver-parity(no DB/env/wrangler-binding/docs changes in this PR, so all no-op green as expected).npm run test:coveragefull run in my local sandbox reports 15 failing tests across 3 files (selfhost-ams-reporting.test.ts,miner-discover-cli.test.ts,miner-live-issue-snapshot.test.ts), all pre-existing and unrelated to this diff: thesqlite3CLI binary is not installed in this sandbox (those tests shell out to it), and a realGITHUB_TOKENis present in this shell's env and leaks into tests asserting no-token behavior. Confirmed identical failures on a clean stash of this branch at the same base commit before any of my changes. New coverage confirmed viatest/unit/mcp-skipped-pr-audit.test.ts(11 cases covering: default no-filter feed scoped to the caller's own repos, each ofrepoFullName/reason/sincefiltered independently,limitclamped at both the 1 and 100 boundaries, an empty-page result, a session with no maintainer/owner/operator role being forbidden, a non-operator owner explicitly requesting its own scoped repo, a maintainer forbidden from a repo outside its scope, an unparseablesincevalue, and the staticmcpidentity both forbidden and allowed depending onMCP_READ_REPO_ALLOWLIST) plus the existingtest/unit/mcp-output-schemas.test.tsandtest/integration/api.test.tsskipped-pr-audit route coverage, all still green after the shared-constant extraction. Verified via lcov that every new line and branch insrc/mcp/server.ts(input/output schema, tool registration,requireSkippedPrAuditAccess,getSkippedPrAudit) and the new/moved code insrc/signals/settings-preview.tsis hit.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.No UI changes in this PR — the last two Safety checkboxes and the UI Evidence section below are not applicable.
UI Evidence
Not applicable — this PR only adds a backend/MCP tool with no visible UI, frontend, docs, or extension surface.
Notes
requireSkippedPrAuditAccess) mirrors the HTTP route'sskippedPrAuditRepoScope(sameloadControlPanelRoleSummary/loadControlPanelAccessScopecalls, same maintainer/owner/operator role gate, same "no filter → caller's own scoped repos" fallback), reimplemented against this file's MCP identity/throw conventions rather than reused directly, sinceskippedPrAuditRepoScopeis bound to a HonoProtectedRouteContextand returns aResponse, neither of which an MCP tool method can use. The shared staticmcpCLI token additionally requires the unscopedMCP_READ_REPO_ALLOWLISTwildcard opt-in for this tool, matching every other cross-repo/maintainer-report MCP gate in this file (requireOperatorAccess,requireDiscoveryAccess).