Skip to content

feat(mcp): register loopover_get_repo_onboarding_pack as a local stdio tool#7968

Closed
rsnetworkinginc wants to merge 1 commit into
JSONbored:mainfrom
rsnetworkinginc:mcp-onboarding-pack-7756-8c2950c3
Closed

feat(mcp): register loopover_get_repo_onboarding_pack as a local stdio tool#7968
rsnetworkinginc wants to merge 1 commit into
JSONbored:mainfrom
rsnetworkinginc:mcp-onboarding-pack-7756-8c2950c3

Conversation

@rsnetworkinginc

Copy link
Copy Markdown
Contributor

Summary

Closes #7756loopover_get_repo_onboarding_pack has a remote MCP tool (src/mcp/server.ts) and a maintain onboarding-pack CLI command, but no local stdio MCP tool registration. #6738 added the REST route + CLI but never the matching stdio tool, so a self-host operator using the local MCP server (not the CLI or remote MCP) couldn't call it.

What changed (packages/loopover-mcp/bin/loopover-mcp.ts)

  • A registerStdioTool("loopover_get_repo_onboarding_pack", …) block, following the existing sibling get-repo pattern exactly.
  • **Reuses the same apiGet(\${prefix}/onboarding-pack/preview${query}`)call** themaintain onboarding-pack CLI already makes (query = refresh === true ? "?refresh=true" : ""`) — no duplicated HTTP logic.
  • A repoOnboardingPackShape (owner/repo required, refresh optional boolean) and a STDIO_TOOL_DESCRIPTORS entry (category maintainer, matching the remote registration).

owner/repo resolve the same way as the sibling repo-scoped stdio tools; refresh is optional (omit for the cached preview, true to force a refresh — the server treats only the exact string "true" as a refresh, matching the CLI).

Tests

  • New test/unit/mcp-cli-get-repo-onboarding-pack.test.ts drives the tool in-process (the loopover_plan_repo_issues has no REST route, CLI command, or local stdio MCP tool #7764 entrypoint-guard pattern — InMemoryTransport against the exported server) so the registration + handler get real Codecov coverage. Both arms of the refresh ternary are covered (omitted → no query; refresh: true?refresh=true). The mcp-cli-harness already had the /v1/repos/:owner/:repo/onboarding-pack/preview route + fixture, so no new harness hook was needed.
  • Tool-count invariant in mcp-tool-rename-aliases.test.ts bumped 91 → 92.

Verified locally on top of current main: npm run typecheck clean, npm run build:mcp clean, git diff --check clean, test/unit/mcp-cli-get-repo-onboarding-pack.test.ts + test/unit/mcp-tool-rename-aliases.test.ts all green, and 100% patch coverage on the changed bin/loopover-mcp.ts lines (the single refresh branch covered both ways).

…o tool

loopover_get_repo_onboarding_pack has a remote MCP tool (src/mcp/server.ts) and
a `maintain onboarding-pack` CLI mirror, but no local stdio MCP tool
registration, so a self-host operator using the local MCP server could not call
it.

Adds the registerStdioTool block following the existing sibling get-repo pattern
(loopover_get_repo_focus_manifest et al.): a repoOnboardingPackShape zod const
(owner/repo required, refresh optional), a STDIO_TOOL_DESCRIPTORS entry, and a
thin GET proxy of {repoBase}/onboarding-pack/preview -- the same endpoint the
onboarding-pack CLI already calls, no duplicated HTTP. `refresh: true` forwards
?refresh=true exactly as the CLI does; omitted otherwise so the server serves
the cached preview.

test/unit/mcp-cli-get-repo-onboarding-pack.test.ts drives it in-process (the
coverage, exercising both sides of the refresh query ternary. Tool-count
invariant bumped 90 -> 91.

Closes JSONbored#7756
@superagent-security

Copy link
Copy Markdown
Contributor

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

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 22, 2026
@loopover-orb

loopover-orb Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-22 00:41:08 UTC

3 files · 1 AI reviewer · no blockers · CI green · dirty

⏸️ Suggested Action - Manual Review

Review summary
This PR registers loopover_get_repo_onboarding_pack as a local stdio tool by adding a Zod input shape, a STDIO_TOOL_DESCRIPTORS entry, and a registerStdioTool handler that proxies to the existing /v1/repos/:owner/:repo/onboarding-pack/preview route, exactly mirroring the sibling get-repo stdio tools and reusing the same query-building logic the CLI already uses. The change is well-scoped, closes issue #7756 as described, and the tool-count invariant bump (94→95) is correctly threaded through both the descriptor test and the tool-rename-aliases test. The new in-process test exercises both arms of the refresh ternary against a real registered handler, which is solid coverage for this thin proxy.

Nits — 5 non-blocking
  • The flagged 'generic_secret_assignment' at test/unit/mcp-cli-get-repo-onboarding-pack.test.ts:34 is just a literal placeholder string `"in-process-token"` used as a fixture credential, consistent with the sibling test files — not a real secret, but worth confirming no real token ever ends up in this pattern.
  • packages/loopover-mcp/bin/loopover-mcp.ts:1721 uses `any` for the handler args (`async ({ owner, repo, refresh }: any) =>`), matching the existing convention in this file for other registerStdioTool handlers, but it would be nice to type it against `repoOnboardingPackShape` if this file is ever tightened up.
  • The long-file smell on loopover-mcp.ts (~1733 lines) is pre-existing and not something this PR should be expected to address given the file's stated single-file design decision noted in its header comment.
  • Consider adding a one-line reference in the new test file's header comment to the exact CLI command (`maintain onboarding-pack`) whose apiGet call is being reused, for future readers scanning test intent quickly.
  • 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 #7756
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
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: 5 registered-repo PR(s), 0 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor rsnetworkinginc; Gittensor profile; 5 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Linked issue satisfaction

Addressed
The PR adds a registerStdioTool block for loopover_get_repo_onboarding_pack that mirrors the sibling pattern, reuses the apiGet call to the same onboarding-pack/preview endpoint used by the CLI, and centralizes the description via stdioToolDescription/STDIO_TOOL_DESCRIPTORS as required, with accompanying tests updating the tool-count invariant.

Review context
  • Author: rsnetworkinginc
  • 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: 5 PR(s), 0 issue(s).
  • Related work: Titles/paths share 8 meaningful terms. (PR #7969)
  • Related work: Titles/paths share 10 meaningful terms. (PR #7966)
  • Related work: Titles/paths share 8 meaningful terms. (PR #7967)
  • Additional title-only matches omitted; title-only overlap does not block.
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 <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> 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

@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.78%. Comparing base (8c2950c) to head (6033692).

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #7968       +/-   ##
===========================================
- Coverage   91.87%   81.78%   -10.09%     
===========================================
  Files         735       91      -644     
  Lines       75477    23718    -51759     
  Branches    22960     4552    -18408     
===========================================
- Hits        69344    19398    -49946     
+ Misses       5041     4124      -917     
+ Partials     1092      196      -896     
Flag Coverage Δ
shard-1 0.00% <0.00%> (-58.35%) ⬇️
shard-2 11.69% <100.00%> (-40.45%) ⬇️
shard-3 0.00% <0.00%> (-50.10%) ⬇️

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 11.69% <100.00%> (-4.69%) ⬇️

... and 644 files with indirect coverage changes

@loopover-orb

loopover-orb Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (conflicts with the base branch — resolve and open a fresh PR). 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:bug Gittensor-scored bug fix — scores a 0.05x multiplier. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Register loopover_get_repo_onboarding_pack as a local stdio MCP tool

1 participant