Skip to content

feat(mcp): add remote + stdio surfaces for loopover_get_gate_config_effective#7928

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
RealDiligent:feat/mcp-gate-config-effective-7800
Jul 21, 2026
Merged

feat(mcp): add remote + stdio surfaces for loopover_get_gate_config_effective#7928
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
RealDiligent:feat/mcp-gate-config-effective-7800

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • vitest mcp-cli-gate-config-effective + mcp-output-schemas + mcp-tool-rename-aliases
  • CI validate / validate-tests green
  • codecov/patch not 0% on bin-only lines

Made with Cursor

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

Copy link
Copy Markdown
Contributor

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

…ffective

Mirror loopover_get_pr_reviewability auth (mcp read allowlist) and the REST
gate-config/effective shape on both remote MCP and local stdio. Cover empty /
populated / forbidden remotely and instrument the bin via the JSONbored#7764 in-process
exported-server pattern so codecov/patch sees the new lines.

Closes JSONbored#7800

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

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.50%. Comparing base (1257c20) to head (622b67d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7928      +/-   ##
==========================================
- Coverage   91.77%   82.50%   -9.28%     
==========================================
  Files         731       90     -641     
  Lines       74913    24435   -50478     
  Branches    22850     4700   -18150     
==========================================
- Hits        68752    20160   -48592     
+ Misses       5083     4039    -1044     
+ Partials     1078      236     -842     
Flag Coverage Δ
shard-1 22.78% <33.33%> (-37.15%) ⬇️
shard-2 22.19% <20.00%> (-24.30%) ⬇️
shard-3 33.00% <86.66%> (-21.78%) ⬇️

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

Files with missing lines Coverage Δ
packages/loopover-mcp/bin/loopover-mcp.ts 13.95% <100.00%> (+0.11%) ⬆️
src/mcp/server.ts 96.64% <100.00%> (+0.03%) ⬆️

... and 641 files with indirect coverage changes

@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

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-21 18:54:47 UTC

7 files · 1 AI reviewer · no blockers · readiness 88/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR mirrors the established pattern from #7917/#7921/#7924/#7926 to register `loopover_get_gate_config_effective` on both the remote MCP server (src/mcp/server.ts) and the stdio bin, wrapping the existing `loadOverride`/`loadShadowOverride` primitives with the same forbidden-check/allowlist gating as `loopover_get_live_gate_thresholds`. Test coverage is thorough: empty-override nulls, live-override + shadow-pending, and forbidden-allowlist cases in mcp-output-schemas.test.ts, plus in-process stdio coverage via InMemoryTransport and updated tool-count assertions (86→87) in mcp-tool-rename-aliases.test.ts. The change is narrowly scoped, closes the linked #7800 issue, and follows the file's existing conventions closely enough that I don't see a correctness defect in the visible diff.

Nits — 6 non-blocking
  • packages/loopover-mcp/bin/loopover-mcp.ts:1605 uses `async ({ owner, repo }: any) =>` — matches the existing pattern in this file so it's consistent, but it'd be worth typing this properly at some point rather than perpetuating the any-typed handler pattern.
  • The flagged 'leaked secret' at test/unit/mcp-cli-gate-config-effective.test.ts:32 is just a placeholder test token (`LOOPOVER_API_TOKEN = "in-process-token"`), not a real credential — no action needed.
  • src/mcp/server.ts and packages/loopover-mcp/bin/loopover-mcp.ts are both very large files that this PR adds to; consider whether these tool registrations eventually warrant a table-driven/generated registration approach instead of continued copy-paste growth (out of scope for this PR).
  • Confirm `loadOverride`/`loadShadowOverride` and their types are already imported in src/mcp/server.ts (not shown in the diff hunk) since they're reused here from the live-gate-thresholds tool.
  • Consider asserting in mcp-output-schemas.test.ts that `effective.scopeCap` keys stay `files`/`lines` in sync with the REST route's shape if that route's schema ever changes, to catch drift early.
  • Possible secret-shaped assignment in the diff (generic_secret_assignment) — Verify the value is not a real credential.

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 #7800
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ❌ 8/20 High 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: 393 registered-repo PR(s), 176 merged, 36 issue(s).
Contributor context ✅ Confirmed Gittensor contributor RealDiligent; Gittensor profile; 393 PR(s), 36 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The PR registers loopover_get_gate_config_effective as a remote MCP tool with ownerRepoShape input and "maintainer" category, adds a matching stdio tool in loopover-mcp.ts calling GET .../gate-config/effective, and adds unit tests covering registration, output shape, and the forbidden allowlist case without touching the REST route or adding a new CLI verb.

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: 393 PR(s), 36 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Add a concise scope and risk note.
  • Then work through the remaining 1 step in the Signals table above.
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 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.

@loopover-orb
loopover-orb Bot merged commit 03f9d9c into JSONbored:main Jul 21, 2026
12 checks passed
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.

loopover_get_gate_config_effective has a REST route but no remote MCP tool or local stdio MCP tool

1 participant