Skip to content

feat(mcp): add remote + stdio + CLI for selftune override audit - #7947

Closed
RealDiligent wants to merge 3 commits into
JSONbored:mainfrom
RealDiligent:feat/mcp-selftune-override-audit-7798-v3
Closed

feat(mcp): add remote + stdio + CLI for selftune override audit#7947
RealDiligent wants to merge 3 commits into
JSONbored:mainfrom
RealDiligent:feat/mcp-selftune-override-audit-7798-v3

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

Closes #7798

Test plan

  • mcp-selftune-override-audit.test.ts (authorized + empty + allowlist deny)
  • mcp-cli-selftune-override-audit.test.ts (in-process stdio, with/without limit)
  • mcp-cli-maintain.test.ts selftune-audit plain/json/limit
  • mcp-cli-basics.test.ts PowerShell completer pin
  • Tool count pin 89 → 90

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 21, 2026 20:24
@superagent-security

Copy link
Copy Markdown
Contributor

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

RealDiligent and others added 2 commits July 22, 2026 04:28
Mirror gate-precision surfaces for GET .../selftune/overrides/audit (JSONbored#7798):
remote tool, stdio proxy, and maintain selftune-audit CLI verb.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 59.09091% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.70%. Comparing base (bc042ed) to head (9d8bc0f).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
packages/loopover-mcp/bin/loopover-mcp.ts 35.71% 8 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7947      +/-   ##
==========================================
+ Coverage   79.50%   82.70%   +3.20%     
==========================================
  Files         735       92     -643     
  Lines       75452    24776   -50676     
  Branches    22952     4738   -18214     
==========================================
- Hits        59986    20492   -39494     
+ Misses      12710     4047    -8663     
+ Partials     2756      237    -2519     
Flag Coverage Δ
shard-1 22.89% <36.36%> (-31.34%) ⬇️
shard-2 22.40% <45.45%> (-31.39%) ⬇️
shard-3 33.61% <45.45%> (?)

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.73% <100.00%> (+9.69%) ⬆️
packages/loopover-mcp/bin/loopover-mcp.ts 14.32% <35.71%> (+0.22%) ⬆️

... and 643 files with indirect coverage changes

Tests passed; tokenless Codecov coverage upload failed GPG key fetch.

Co-authored-by: Cursor <cursoragent@cursor.com>
@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 21, 2026
@loopover-orb

loopover-orb Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - fixes required

Review updated: 2026-07-21 21:00:32 UTC

10 files · 1 AI reviewer · no blockers · CI failing · unstable

🛑 Suggested Action - Fix Blockers

Review summary
This PR mirrors the established pattern (like gate-precision) to add a new maintainer-only tool surfacing the self-tune override audit trail across remote MCP, stdio MCP, and CLI, with pin updates for tool count (89→90) and the PowerShell completer. The wiring traces correctly: the remote tool calls listOverrideAudit from src/review/auto-apply.ts behind requireRepoAccess, the stdio tool proxies GET .../selftune/overrides/audit, and the CLI subcommand mirrors precision's emit/--json shape. Test coverage is broad (authorized/empty/allowlist-deny, stdio in-process, CLI plain/json/limit), though the CLI's `Number(options.limit)` producing `NaN > 0 === false` for an omitted --limit is untested but behaves correctly by falling through.

Nits — 6 non-blocking
  • packages/loopover-mcp/bin/loopover-mcp.ts:2833 and :3608 use `any` for the callback/handler parameter, consistent with the rest of the file's style but still worth tightening if this file is ever split.
  • The flagged 'secret' in test/unit/mcp-cli-selftune-override-audit.test.ts:30 is just `LOOPOVER_API_TOKEN = "in-process-token"`, a hardcoded test fixture value, not a real leaked credential.
  • codecov/patch is failing (45–59% vs 99% target); the two full-file-content dumps show the changed lines are exercised by the new tests, so this is likely coverage-tool line-counting on the diff context rather than truly uncovered branches — worth confirming which specific lines are flagged.
  • The `// Self-tune override audit trail (selftune/overrides/audit) has no remote MCP tool, local stdio MCP tool, or CLI verb #7798` comment style at packages/loopover-mcp/bin/loopover-mcp.ts:2822-2823 duplicates explanation already present in the server.ts comment; fine but slightly repetitive across the two proxy layers.
  • Double check codecov/patch's uncovered-line report directly rather than assuming it's noise — if it names lines in src/mcp/server.ts's getSelftuneOverrideAudit or the stdio proxy, add a targeted test.
  • Possible secret-shaped assignment in the diff (generic_secret_assignment) — Verify the value is not a real credential.

CI checks failing

  • codecov/patch — 59.09% of diff hit (target 99.00%)

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #7798
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 395 registered-repo PR(s), 173 merged, 36 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 395 PR(s), 36 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The PR registers loopover_get_selftune_override_audit as a remote MCP tool (maintainer category) calling listOverrideAudit, adds the matching stdio tool proxying GET .../selftune/overrides/audit, and adds a maintain selftune-audit CLI verb mirroring precision's emit/--json structure, exactly the three mirror surfaces requested.

Review context
  • Author: RealDiligent
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: Python, JavaScript, Ruby, Svelte, TypeScript, Markdown, MDX
  • Official Gittensor activity: 395 PR(s), 36 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask 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.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

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.

  • Re-run LoopOver review

@loopover-orb

loopover-orb Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@loopover-orb loopover-orb Bot closed this Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Self-tune override audit trail (selftune/overrides/audit) has no remote MCP tool, local stdio MCP tool, or CLI verb

1 participant