Skip to content

feat(mcp): register the 8 miner write-tools on the local stdio server - #6390

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
davion-knight:feat-mcp-write-tools-r2
Jul 16, 2026
Merged

feat(mcp): register the 8 miner write-tools on the local stdio server#6390
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
davion-knight:feat-mcp-write-tools-r2

Conversation

@davion-knight

Copy link
Copy Markdown
Contributor

What & why

packages/loopover-mcp's miner-auto-dev profile lists loopover_open_pr, loopover_file_issue, loopover_apply_labels, loopover_post_eligibility_comment, loopover_create_branch, loopover_delete_branch, loopover_generate_tests, and loopover_file_follow_up_issue in its recommendedTools, but none were registered as local stdio tools — a contributor driving the local server could not invoke any of the write-tools the profile promises.

This registers all 8, reusing the same pure @loopover/engine spec builders the remote server (src/mcp/server.ts) already uses. Each tool returns a LOCAL-execution action spec ({ action, command, boundary }) that the caller runs with its own gh/git credentials — loopover never performs the write itself. Input shapes mirror the remote server's bounds; the test-framework enum mirrors @loopover/engine's TEST_FRAMEWORKS.

Tests

Adds test/unit/mcp-cli-write-tools.test.ts — drives the real local stdio bin over StdioClientTransport and asserts, per tool, the composed spec (e.g. loopover_open_prgh pr create --repo '…', loopover_create_branchgit switch -c '…') plus a zod input-rejection failure path. Updates mcp-tool-rename-aliases.test.ts for the new registered-tool count (50).

Closes #6149

packages/loopover-mcp's miner-auto-dev profile lists loopover_open_pr,
file_issue, apply_labels, post_eligibility_comment, create_branch,
delete_branch, generate_tests, and file_follow_up_issue in its recommendedTools,
but none were registered as local stdio tools -- a contributor on the local
server could not invoke any of them. Register all 8, reusing the same pure
@loopover/engine spec builders the remote server (src/mcp/server.ts) uses: each
returns a LOCAL-execution action spec the caller runs with its OWN gh/git creds
(loopover never performs the write). Input shapes mirror the remote bounds; the
test-framework enum mirrors @loopover/engine's TEST_FRAMEWORKS. Adds a
CLI-harness test per tool (spec composition + a zod-rejection failure path).

Closes JSONbored#6149
@davion-knight
davion-knight requested a review from JSONbored as a code owner July 16, 2026 05:58
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.60%. Comparing base (7152db6) to head (a9759ff).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6390   +/-   ##
=======================================
  Coverage   95.60%   95.60%           
=======================================
  Files         599      599           
  Lines       47238    47238           
  Branches    15031    15031           
=======================================
  Hits        45160    45160           
  Misses       1291     1291           
  Partials      787      787           
Flag Coverage Δ
shard-1 44.06% <ø> (ø)
shard-2 36.72% <ø> (+0.12%) ⬆️
shard-3 32.52% <ø> (+<0.01%) ⬆️
shard-4 34.68% <ø> (+0.06%) ⬆️
shard-5 31.58% <ø> (-0.01%) ⬇️
shard-6 44.87% <ø> (ø)

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

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 16, 2026
@loopover-orb

loopover-orb Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-16 06:15:36 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This registers the 8 miner write-tools on the local stdio server by importing and wiring the existing pure `@​loopover/engine` spec builders, closing the gap where the miner-auto-dev profile promised tools that were never registered locally. The input shapes mirror the remote server's bounds, the TEST_FRAMEWORKS enum matches the engine's set, and the test suite drives the real stdio bin via StdioClientTransport asserting composed commands per tool plus a rejection path. The change is well-scoped, closes issue #6149 as claimed, and the tool-count test updates (47→55) are consistent with the 8 additions.

Nits — 5 non-blocking
  • packages/loopover-mcp/bin/loopover-mcp.js: several new numeric bounds (200, 400, 60000, 255, etc.) are named via WRITE_TOOL_* constants but a few inline literals (3, 20, 500, 50, 300) aren't — consider extracting for consistency with the pattern already established.
  • test/unit/mcp-cli-write-tools.test.ts: the invalid-input map building one `Record<string, Record<string, unknown>>` and iterating is a bit indirect — a `describe.each`/table-per-tool would give clearer failure messages, but this is purely stylistic.
  • packages/loopover-mcp/bin/loopover-mcp.js is now a very large file (~1795 lines per the size-smell scan); worth flagging for a future split even though this PR only adds to an existing pattern rather than introducing the size problem.
  • Consider extracting the remaining magic numbers (3, 20, 500, 50, 300) into named constants alongside the existing WRITE_TOOL_* ones for readability.
  • If loopover-mcp.js continues to grow with each new tool category, consider splitting write-tool registration into its own module now that there are 8 of them with shared shapes.

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 #6149
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: 157 registered-repo PR(s), 103 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor davion-knight; Gittensor profile; 157 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: moderate
Linked issue satisfaction

Addressed
The PR registers all 8 requested tools via registerStdioTool in bin/loopover-mcp.js, reusing shared @​loopover/engine spec builders that mirror the remote server's input shapes/behavior, and adds a dedicated test file exercising success and zod-rejection failure paths for each tool. It also addresses the two flagged 'may have no precedent' tools (generate_tests, file_follow_up_issue) by using pure

Review context
  • Author: davion-knight
  • 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: 157 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Add a concise scope and risk note.
  • 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 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 9197680 into JSONbored:main Jul 16, 2026
16 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 16, 2026
12 tasks
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.

feat(mcp): register the 8 write-tools (open_pr/file_issue/apply_labels/etc.) that packages/loopover-mcp's own recommendedTools already promise

1 participant