Skip to content

feat(mcp): register loopover_refresh_repo_docs as a local stdio tool#7969

Closed
real-venus wants to merge 2 commits into
JSONbored:mainfrom
real-venus:feat/refresh-repo-docs-stdio-tool-7754
Closed

feat(mcp): register loopover_refresh_repo_docs as a local stdio tool#7969
real-venus wants to merge 2 commits into
JSONbored:mainfrom
real-venus:feat/refresh-repo-docs-stdio-tool-7754

Conversation

@real-venus

Copy link
Copy Markdown
Contributor

Summary

Closes #7754loopover_refresh_repo_docs has a remote MCP tool (src/mcp/server.ts) and a maintain refresh-docs CLI command, but no local stdio MCP tool registration. #6743 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_refresh_repo_docs", …) block, placed next to loopover_get_maintainer_noise, mirroring the sibling proxy pattern exactly — a thin POST of the same {repoBase}/repo-docs/refresh route the maintain refresh-docs CLI already calls, with an empty body (the route only ever opens a PR — never merges or commits — so there's no create-safety flag to forward).
  • Input reuses the existing ownerRepoShape (matching the remote refreshRepoDocsShape, which is just owner/repo). Description centralized via stdioToolDescription(...) + a STDIO_TOOL_DESCRIPTORS entry (category: "maintainer", matching the remote tool).

Testing / coverage

  • test/unit/mcp-cli-refresh-repo-docs.test.ts drives the tool in-process (the loopover_plan_repo_issues has no REST route, CLI command, or local stdio MCP tool #7764 isProcessEntrypoint guard + InMemoryTransport, mirroring mcp-cli-repo-focus-manifest.test.ts) so the registration + handler get real Codecov-measured coverage — a subprocess spawn can't be v8-instrumented. The handler is branch-free, so one call exercises it fully; the test asserts the exact POST /v1/repos/owner/repo/repo-docs/refresh and the returned PR result.
  • Tool-count invariant in test/unit/mcp-tool-rename-aliases.test.ts bumped to 95.

No REST/OpenAPI/CLI-surface change (the route and maintain refresh-docs CLI already exist) — ui:openapi:check, command-reference:check, docs/manifest drift all clean; build:mcp clean.

loopover_refresh_repo_docs has a remote MCP tool (src/mcp/server.ts) and a
`maintain refresh-docs` CLI command, but no local stdio MCP tool registration.
JSONbored#6743 added the REST route + CLI but never the matching stdio tool, so a self-host
operator using the local MCP server couldn't call it.

Adds the registerStdioTool block following the existing sibling pattern -- a thin
POST proxy of the same {repoBase}/repo-docs/refresh route the CLI hits, with an
empty body (the route only ever opens a PR -- never merges/commits -- so there is
no create-safety flag to forward). Input reuses ownerRepoShape (matching the remote
refreshRepoDocsShape); description via stdioToolDescription; category "maintainer".

test/unit/mcp-cli-refresh-repo-docs.test.ts drives it in-process (JSONbored#7764 entrypoint
guard) so the registration + handler get real Codecov coverage. Count 94 -> 95.

Closes JSONbored#7754
@real-venus
real-venus requested a review from JSONbored as a code owner July 22, 2026 00:36
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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.54%. Comparing base (ca738de) to head (4190be6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7969      +/-   ##
==========================================
- Coverage   89.11%   81.54%   -7.57%     
==========================================
  Files          93       89       -4     
  Lines       21723    23424    +1701     
  Branches     3755     4517     +762     
==========================================
- Hits        19358    19102     -256     
- Misses       2187     4126    +1939     
- Partials      178      196      +18     
Flag Coverage Δ
shard-1 11.64% <100.00%> (?)
shard-3 0.00% <0.00%> (?)

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.64% <100.00%> (ø)

... and 8 files with indirect coverage changes

Signed-off-by: venus <153379385+real-venus@users.noreply.github.com>
@loopover-orb

loopover-orb Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - fixes required

Review updated: 2026-07-22 00:45:44 UTC

3 files · 1 AI reviewer · no blockers · CI failing · blocked

🛑 Suggested Action - Fix Blockers

Review summary
This adds a thin stdio-tool proxy (`loopover_refresh_repo_docs`) that mirrors the existing `loopover_get_maintainer_noise` pattern exactly: same `ownerRepoShape` input, same `apiPost` call to the identical `{repoBase}/repo-docs/refresh` route the CLI's `maintain refresh-docs` already hits, and a matching `STDIO_TOOL_DESCRIPTORS` entry. The new in-process test (`mcp-cli-refresh-repo-docs.test.ts`) asserts the exact POST path and payload shape, and the tool-count invariant in `mcp-tool-rename-aliases.test.ts` was correctly bumped from 94 to 95. This is a narrow, well-scoped wiring fix closing a real gap (#7754) with no schema, REST, or CLI-surface changes needed.

Nits — 5 non-blocking
  • The `: any` param annotation on the new handler (`packages/loopover-mcp/bin/loopover-mcp.ts:1689`) matches the file's existing loose-typing convention for these proxy handlers, but confirm that's intentional and not something worth tightening given `{ owner, repo }` types are already known from `ownerRepoShape`.
  • The external scan flagged `LOOPOVER_API_TOKEN = "in-process-token"` in the new test file as a possible leaked secret — it's a hardcoded test fixture string, not a real credential, so no rotation is needed, but worth a quick glance to confirm.
  • validate and validate-tests (2) failed with no detail provided in CI status; no base-branch-behind signal was given here, so the cause could not be verified from what's available — worth checking the raw log.
  • If future refresh-related stdio tools are added, consider whether the empty-body POST convention (no create-safety flag) should be documented once in the shared proxy-pattern comment rather than repeated per-tool.
  • Possible secret-shaped assignment in the diff (generic_secret_assignment) — Verify the value is not a real credential.

CI checks failing

  • validate
  • validate-tests (2)

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 #7754
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: 112 registered-repo PR(s), 50 merged, 19 issue(s).
Contributor context ✅ Confirmed Gittensor contributor real-venus; Gittensor profile; 112 PR(s), 19 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The PR adds a registerStdioTool block for loopover_refresh_repo_docs following the exact sibling pattern, reuses the same REST endpoint via a thin apiPost call rather than duplicating HTTP logic, and centralizes the description through STDIO_TOOL_DESCRIPTORS/stdioToolDescription, plus updates tool-count tests and adds dedicated coverage.

Review context
  • Author: real-venus
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript, JavaScript, Python, Rust, CSS, MDX, Svelte, Swift
  • Official Gittensor activity: 112 PR(s), 19 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 22, 2026

Copy link
Copy Markdown
Contributor

LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests (2))). 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Register loopover_refresh_repo_docs as a local stdio MCP tool

1 participant