feat(mcp): add remote + stdio + CLI surfaces for the selftune override audit#7997
Conversation
…e audit Closes JSONbored#7798. Mirrors loopover_get_gate_precision's three-surface shape: loopover_get_selftune_override_audit as a remote MCP tool (category maintainer, owner/repo + optional limit, same requireRepoAccess read gate) and local stdio tool (GET {repoBase}/selftune/overrides/audit via apiGet), plus a 'maintain selftune-audit --repo owner/repo [--limit N]' CLI verb following the precision subcommand's emit/--json structure. listOverrideAudit, the REST route, and its gate are untouched. Tool-count pin 100 -> 101; PowerShell completer pin updated.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-22 03:34:40 UTC
Review summary Nits — 4 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionPartially addressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 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 LoopOver, 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 #7997 +/- ##
==========================================
- Coverage 91.91% 83.13% -8.78%
==========================================
Files 739 96 -643
Lines 75854 25176 -50678
Branches 23018 4802 -18216
==========================================
- Hits 69723 20931 -48792
+ Misses 5038 3994 -1044
+ Partials 1093 251 -842
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Summary
maintain selftune-auditCLI verb — instead of raw REST only.src/mcp/server.ts):loopover_get_selftune_override_audit, category"maintainer", input owner/repo + optionallimit(mirroring the route's?limitquery), calling the samelistOverrideAuditthe REST route uses and returning its exact{ repoFullName, audit }shape. Same per-repo read gate asloopover_get_gate_precision(requireRepoAccess), per the issue's required pattern.packages/loopover-mcp/bin/loopover-mcp.ts): proxiesGET {repoBase}/selftune/overrides/auditviaapiGet, forwarding?limitonly when set — same shape as theloopover_get_gate_precisionstdio registration.maintain selftune-audit --repo owner/repo [--limit N] [--json], following theprecisionsubcommand's structure exactly (sameemit/--jsonhandling, same query-building), wired into the subcommand list,maintain --help, the unknown-subcommand message, and the top-level usage line.listOverrideAudit, the REST route, and itsrequireRepoMaintainergate are untouched — this only adds the three missing mirror surfaces.loopover_get_gate_precision's own (test/unit/mcp-selftune-override-audit.test.ts: repo-scoped rows + limit pass-through, empty trail, forbidden identity), plus in-process bin coverage for the CLI dispatcher AND stdio tool via the exportedmaintainCli/server+InMemoryTransport(test/unit/mcp-cli-selftune-audit.test.ts, same loopover_plan_repo_issues has no REST route, CLI command, or local stdio MCP tool #7764 entrypoint-guard pattern asmcp-cli-plan-issues), covering both sides of every new branch (--limitpresent/absent, detail-bearing/detail-less events, audit-less payload, unknown-subcommand fall-through, help text). Tool-count pin bumped 100 → 101 inmcp-tool-rename-aliases;packages/loopover-mcp/bin/**confirmed in vitestcoverage.include.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.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:
npm run test:cigate was run from the repo root (it includes every check above plus the drift checks) and passed, followed bynpm audit --audit-level=moderate. The audit reports pre-existing advisories already present onmain's dependency tree (fast-uri, and@hono/node-servertransitively under@modelcontextprotocol/sdk/@cloudflare/codemode/agents) — this PR changes no dependencies, and those advisories are already being addressed by the open Renovate updates.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.UI Evidence
Not applicable — backend MCP/CLI surfaces only; no visible UI, frontend, docs, or extension change.
Notes
tools/listgainsloopover_get_selftune_override_audit(categorymaintainer) with an output schema (repoFullName,audit); audit rows stay schema-opaque (z.unknown()) becauselistOverrideAuditis their single source of truth, matchinggatePrecisionOutputSchema's sub-report pattern. No REST or OpenAPI surface changed, so no regenerated artifacts were needed (command-reference:check,docs:drift-check,manifest:drift-checkall pass unchanged).requireRepoAccessthrow), so the output schema carries nostatusarm.