Skip to content

feat(miner): scaffold the gittensory-miner MCP stdio server - #5232

Closed
jaytbarimbao-collab wants to merge 1 commit into
JSONbored:mainfrom
jaytbarimbao-collab:feat-miner-mcp-scaffold
Closed

feat(miner): scaffold the gittensory-miner MCP stdio server#5232
jaytbarimbao-collab wants to merge 1 commit into
JSONbored:mainfrom
jaytbarimbao-collab:feat-miner-mcp-scaffold

Conversation

@jaytbarimbao-collab

Copy link
Copy Markdown
Contributor

Scaffolds the first MCP entry point under packages/gittensory-miner, mirroring the existing packages/gittensory-mcp/bin/gittensory-mcp.js harness (MCP SDK server + stdio transport). Independently shippable, and it unblocks the other MCP-exposure issues in this batch (status/doctor diagnostics, portfolio dashboard, claim-ledger listing all add tools "to the AMS MCP server from the scaffold").

What this adds

  • packages/gittensory-miner/bin/gittensory-miner-mcp.js — new executable (#!/usr/bin/env node) that boots an McpServer over StdioServerTransport. Exports a createMinerMcpServer() factory so tests can drive it in-process; the transport only starts when the file is run directly as the bin (realpath-matched so an npm/npx symlink still triggers it).
  • One tool only: gittensory_miner_ping — a health check returning a static { "status": "ok", "tool": "gittensory_miner_ping" }, empty input schema, no AMS-state reads. No status/doctor, portfolio, or claim-ledger tools here — those are explicit follow-ups.
  • package.json — registers the gittensory-miner-mcp bin, adds @modelcontextprotocol/sdk@1.29.0 (pinned to match gittensory-mcp), and node---checks the new bin in build. files already ships bin/. Lockfile updated.
  • README — a short "MCP server" section documenting the entry point and its single-tool scope.

Validation (local)

  • test/unit/miner-mcp-scaffold.test.ts (new): drives the real server over an in-memory transport and asserts (1) exactly gittensory_miner_ping is listed, (2) the ping returns the static object, (3) the invariant — same object on every call with no on-disk AMS state. 3/3 pass.
  • test/unit/miner-package-skeleton.test.ts: updated the exact bin assertion for the new entry; full file 5/5 pass.
  • npm --prefix packages/gittensory-miner run build (node --check all, incl. new bin): OK. Bin is chmod +x, shebang present.

Note: packages/gittensory-miner/** currently sits outside vitest's coverage.include, so codecov/patch cannot measure this change yet (closed separately by #4864/#4865); the tests above still enforce full behavioral coverage of the new code.

Closes #5153

@superagent-security

Copy link
Copy Markdown
Contributor

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

Add a second bin entry, gittensory-miner-mcp, mirroring the packages/gittensory-mcp
harness (MCP SDK server + stdio transport). It ships exactly one trivial health-check
tool, gittensory_miner_ping, returning a static {status,tool} object -- no AMS state
read, no arguments -- so future AMS-state-reading tools (status/doctor, portfolio
dashboard, claim-ledger listing) have a real server to be added to.

- new bin/gittensory-miner-mcp.js (executable; exported factory for in-process tests)
- register the bin + @modelcontextprotocol/sdk dependency in package.json (+ lockfile)
- smoke test drives the server over an in-memory transport, asserting the ping response,
  the single-tool listing, and the static invariant with no on-disk AMS state
- README pointer for the new entry point and its current single-tool scope

Closes JSONbored#5153
@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.74%. Comparing base (2e9fab7) to head (7c798d1).
⚠️ Report is 6 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (2e9fab7) and HEAD (7c798d1). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (2e9fab7) HEAD (7c798d1)
shard-2 1 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5232      +/-   ##
==========================================
- Coverage   94.34%   86.74%   -7.61%     
==========================================
  Files         473      473              
  Lines       39968    39968              
  Branches    14570    14570              
==========================================
- Hits        37708    34670    -3038     
- Misses       1585     4009    +2424     
- Partials      675     1289     +614     
Flag Coverage Δ
shard-1 46.30% <ø> (-0.13%) ⬇️
shard-2 ?
shard-3 30.95% <ø> (-0.02%) ⬇️
shard-4 33.08% <ø> (-0.24%) ⬇️
shard-5 33.68% <ø> (-0.01%) ⬇️
shard-6 44.96% <ø> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 87 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. gittensor:priority Maintainer-selected Gittensor priority — scores a 1.5x multiplier. labels Jul 12, 2026
@loopover-orb

loopover-orb Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - fixes required

Review updated: 2026-07-12 10:44:25 UTC

6 files · no blockers · readiness 100/100 · CI failing · unknown

🛑 Suggested Action - Fix Blockers

  • AI review already in progress for this PR head: Another Gittensory pass is already running the AI review for this exact PR head. This pass is skipping to avoid a duplicate LLM call.

Review summary
AI review is already running for this PR head in another Gittensory pass. Gittensory is holding this PR for manual review until that pass completes.

Nits — 1 non-blocking
  • AI review already in progress for this PR head — The gate is held for a human reviewer rather than passed automatically; it re-evaluates once the in-flight review completes or on the next update.

CI checks failing

  • validate
  • validate-tests (2)
  • validate-code
Signal Result Evidence
Code review ✅ No blockers No AI review summary
Linked issue ✅ Linked #5153
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: 11 registered-repo PR(s), 4 merged, 1 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jaytbarimbao-collab; Gittensor profile; 11 PR(s), 1 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
Improvement ✅ Minor risk: clean · value: minor — Code changes are accompanied by test evidence.
Linked issue satisfaction

Addressed
The PR adds the new gittensory-miner-mcp bin with an MCP stdio server exposing only the gittensory_miner_ping static health-check tool, registers it in package.json's bin field (files already covers bin/), adds a smoke/invariant test driving the server in-memory, and documents the entry point in the README, matching all stated requirements and explicitly excluding AMS-state tools as scoped.

Review context
  • Author: jaytbarimbao-collab
  • 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: 11 PR(s), 1 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.
[BETA] Chat with Gittensory

Ask Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @gittensory ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @gittensory chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @gittensory mention with a real question is routed to the closest matching read-only command automatically -- no exact syntax required.

Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands

🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@loopover-orb

loopover-orb Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Gittensory is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests (2), validate-code)). 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. gittensor:priority Maintainer-selected Gittensor priority — scores a 1.5x multiplier.

Development

Successfully merging this pull request may close these issues.

Scaffold a minimal gittensory-miner mcp stdio server (bin entry, one health-check tool)

2 participants