Skip to content

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

Closed
kai392 wants to merge 1 commit into
JSONbored:mainfrom
kai392:feat/7800-mcp-gate-config-effective-v2
Closed

feat(mcp): add remote + stdio surfaces for loopover_get_gate_config_effective#7925
kai392 wants to merge 1 commit into
JSONbored:mainfrom
kai392:feat/7800-mcp-gate-config-effective-v2

Conversation

@kai392

@kai392 kai392 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • vitest mcp-output-schemas + mcp-gate-config-effective + mcp-cli-gate-config-effective + mcp-tool-rename-aliases; codecov/patch requires ≥99% coverage of the lines AND branches you changed.
  • npm run test:workers
  • npm run build:mcp (local)
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section 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.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

N/A — MCP/API only; no visible UI changes.

Notes

Made with Cursor

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

Copy link
Copy Markdown
Contributor

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

…ffective

Closes JSONbored#7800: mirror REST gate-config/effective on remote MCP and local stdio with canAccessRepo/allowlist auth, declare outputSchema (JSONbored#550), and pin the stdio tool count 84→85.

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

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 29.41176% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.80%. Comparing base (a97dd18) to head (85adc68).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/mcp/server.ts 14.28% 12 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (a97dd18) and HEAD (85adc68). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (a97dd18) HEAD (85adc68)
shard-3 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #7925       +/-   ##
===========================================
- Coverage   91.77%   80.80%   -10.97%     
===========================================
  Files         731       90      -641     
  Lines       74887    24411    -50476     
  Branches    22847     4698    -18149     
===========================================
- Hits        68726    19725    -49001     
+ Misses       5083     4444      -639     
+ Partials     1078      242      -836     
Flag Coverage Δ
shard-1 22.80% <29.41%> (-37.44%) ⬇️
shard-2 21.80% <17.64%> (-24.35%) ⬇️
shard-3 ?

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.66% <100.00%> (+0.07%) ⬆️
src/mcp/server.ts 56.54% <14.28%> (-40.00%) ⬇️

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

Caution

🛑 LoopOver review result - reject/close recommended

Review updated: 2026-07-21 18:32:43 UTC

7 files · 1 AI reviewer · 1 blocker · CI failing · dirty

🛑 Suggested Action - Reject/Close

Review summary
This PR registers loopover_get_gate_config_effective as a thin MCP mirror (remote + stdio) of the existing REST gate-config/effective route, reusing loadOverride/loadShadowOverride and the same canAccessRepo boundary as other maintainer tools, and bumps the tool-count pin from 84 to 85. The wiring looks consistent with sibling tools (e.g. activation_preview), the forbidden-path and live/shadow-override tests exercise real branches, and outputSchema correctly makes fields optional to cover both the forbidden shape and the success shape. The codecov/patch failure (29.41% vs 99% target) is the main open issue — likely from the sizable descriptor/registration boilerplate in loopover-mcp.ts not being fully exercised, though the branch is also 1 commit behind default and that could be a contributing factor.

Blockers

  • codecov/patch failed at 29.41% vs the 99% target — significant chunks of the new registration/proxy code in packages/loopover-mcp/bin/loopover-mcp.ts and/or src/mcp/server.ts are apparently untested despite the two new test files, and this must be resolved (either genuine missing coverage or confirmed as a stale-branch artifact) before merge.
Nits — 6 non-blocking
  • src/mcp/server.ts: the forbidden-path response omits `effective`/`shadowPending` entirely rather than nulling them, which is fine given the optional outputSchema, but consider documenting that callers must branch on `status` before reading `effective` (easy to trip up a consumer expecting a stable shape).
  • packages/loopover-mcp/bin/loopover-mcp.ts:1572 introduces an explicit `any` annotation (`async ({ owner, repo }: any) =>`) — the surrounding stdio tools may follow this pattern, but consider typing against the inferred input schema instead.
  • test/unit/mcp-cli-gate-config-effective.test.ts:37 sets `LOOPOVER_API_TOKEN = "in-process-token"`, a hardcoded fixture token; verify this matches the convention used by sibling test files (e.g. mcp-cli-activation-preview.test.ts) and isn't a real credential pattern.
  • Both new test files and the diff add real branch coverage (forbidden, empty override, live+shadow) which is good, but the low patch-coverage number suggests other changed lines (e.g. descriptor entries, category map entry) aren't being counted — worth double-checking the coverage report to confirm it's boilerplate and not logic.
  • Re-run codecov locally scoped to src/** for this diff to see exactly which lines are uncovered before assuming it's just boilerplate.
  • Possible secret-shaped assignment in the diff (generic_secret_assignment) — Verify the value is not a real credential.

Why this is blocked

  • codecov/patch failed at 29.41% vs the 99% target — significant chunks of the new registration/proxy code in packages/loopover-mcp/bin/loopover-mcp.ts and/or src/mcp/server.ts are apparently untested despite the two new test files, and this must be resolved (either genuine missing coverage or confirmed as a stale-branch artifact) before merge.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. codecov/patch failed at 29.41% vs the 99% target — significant chunks of the new registration/proxy code in packages/loopover-mcp/bin/loopover-mcp.ts and/or src/mcp/server.ts are apparently untested despite the two new test files, and this must be resolved \(either genuine missing coverage or confirmed as a stale-branch artifact\) before merge.

CI checks failing

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

Decision drivers

  • ❌ Code review — 1 blocker (1 reviewer)
  • ❌ Gate result — Blocking (Repo-configured hard blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #7800, #7923
Related work ⚠️ 1 scoped overlap Top overlaps are listed below; lower-confidence bulk is hidden.
Change scope ❌ 8/20 High review scope from cached public metadata (2 linked issues).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 47 registered-repo PR(s), 27 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor kai392; Gittensor profile; 47 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The diff registers loopover_get_gate_config_effective as a remote MCP tool (ownerRepoShape input, "maintainer" category, wired to loadOverride/loadShadowOverride, returning the exact repoFullName/effective/shadowPending shape) and as a local stdio tool proxying GET .../gate-config/effective, with no new REST route or human CLI verb, matching all stated deliverables.

Review context
  • Author: kai392
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: JavaScript, Kotlin, Perl, TypeScript, Vue
  • Official Gittensor activity: 47 PR(s), 0 issue(s).
  • Related work: Titles/paths share 7 meaningful terms. (PR #7926)
Contributor next steps
  • Start here: Review top overlaps.
  • Then work through the remaining 2 steps 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 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); conflicts with the base branch — resolve and open a fresh PR; AI reviewers agree on a likely critical defect: codecov/patch failed at 29.41% vs the 99% target — significant chunks of the new registration/proxy code in packages/loopover-mcp/bin/loopover-mcp.ts and/or src/mcp/server.ts are apparently untested despite the two new test files, and this must be resolved (either genuine missing coverage or confirmed as a stale-branch artifact) before merge.). 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.

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

2 participants