Skip to content

feat(mcp): add remote + stdio surfaces for loopover_get_live_gate_thresholds#7924

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
RealDiligent:feat/mcp-live-gate-thresholds-7801
Jul 21, 2026
Merged

feat(mcp): add remote + stdio surfaces for loopover_get_live_gate_thresholds#7924
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
RealDiligent:feat/mcp-live-gate-thresholds-7801

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • vitest mcp-cli-live-gate-thresholds + 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:14
@superagent-security

Copy link
Copy Markdown
Contributor

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

…esholds

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

Closes JSONbored#7801

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.48%. Comparing base (a97dd18) to head (1b4bbbf).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7924      +/-   ##
==========================================
- Coverage   91.77%   82.48%   -9.29%     
==========================================
  Files         731       90     -641     
  Lines       74887    24409   -50478     
  Branches    22847     4695   -18152     
==========================================
- Hits        68726    20134   -48592     
+ Misses       5083     4039    -1044     
+ Partials     1078      236     -842     
Flag Coverage Δ
shard-1 22.75% <20.00%> (-37.48%) ⬇️
shard-2 21.87% <33.33%> (-24.28%) ⬇️
shard-3 32.64% <86.66%> (-21.06%) ⬇️

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.71% <100.00%> (+0.11%) ⬆️
src/mcp/server.ts 96.57% <100.00%> (+0.04%) ⬆️

... 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:24:38 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR mirrors the existing #7917/#7921 pattern to register loopover_get_live_gate_thresholds on both the remote MCP server and stdio bin, wiring through the existing authoritativeGateOverride/toLiveGateThresholdFields helpers from src/review/auto-apply with allowlist auth via canAccessRepo. It's well-tested (found/not-found/forbidden cases via InMemoryTransport, output schema shape, tool count bump to 85, fixture harness route) and the diff is coherent with its stated intent and linked issue #7801.

Nits — 5 non-blocking
  • The `apiUrl`/`LOOPOVER_API_TOKEN`/harness value flagged by the external brief at test/unit/mcp-cli-live-gate-thresholds.test.ts:32 is a test fixture credential, not a real secret, but consider naming it more obviously as a dummy value to avoid future false-positive secret scans.
  • packages/loopover-mcp/bin/loopover-mcp.ts:1569 uses `async ({ owner, repo }: any)` — the surrounding stdio tools appear to follow this same untyped-callback convention, but it'd be nice to type it against the ownerRepoShape-derived input.
  • src/mcp/server.ts:3416 getLiveGateThresholds casts `this.env as unknown as StorageEnv` — verify this matches the exact same cast pattern used by loadOverride/loadShadowOverride call sites for the sibling REST route to keep them in sync.
  • packages/loopover-mcp/bin/loopover-mcp.ts:1560 — the `any` on the callback param could be replaced with the inferred type from `ownerRepoShape` for consistency with stricter tools elsewhere in the file, if that pattern exists.
  • 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 #7801
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: 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: minor
Linked issue satisfaction

Addressed
The diff registers loopover_get_live_gate_thresholds as a remote MCP tool (ownerRepoShape input, maintainer category) using authoritativeGateOverride/toLiveGateThresholdFields exactly as the REST route does, and as a local stdio tool calling GET .../live-gate-thresholds via apiGet, with the not-found case returned as a normal result rather than a throw, matching the requested pattern.

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: not available
  • Official Gittensor activity: 393 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 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.

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_live_gate_thresholds has a REST route but no remote MCP tool or local stdio MCP tool

1 participant