Skip to content

feat(miner): expose the calibration report as a read-only MCP tool - #5909

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
oktofeesh1:feat/miner-calibration-report-mcp-tool-5821
Jul 15, 2026
Merged

feat(miner): expose the calibration report as a read-only MCP tool#5909
JSONbored merged 1 commit into
JSONbored:mainfrom
oktofeesh1:feat/miner-calibration-report-mcp-tool-5821

Conversation

@oktofeesh1

Copy link
Copy Markdown
Contributor

Summary

  • Adds loopover_miner_get_calibration_report to the miner's stdio MCP server (packages/loopover-miner/bin/loopover-miner-mcp.js), wrapping the existing local prediction-ledger/event-ledger join that already powers loopover-miner calibration --json. No new join/scoring logic — an MCP client can now ask for this miner's own merge/close prediction accuracy without shelling out to the CLI.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked a currently open issue this PR resolves (e.g. Closes #123) — a linked open issue is required for every contributor PR.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npm run test:coverage locally; codecov/patch requires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.
  • npm run test:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

Ran the full local gate via npm run test:ci — green, plus npm audit --audit-level=moderate (0 vulnerabilities). Note: packages/loopover-miner/bin/** is not in the Codecov coverage include glob (only packages/loopover-miner/lib/** is), so this file carries no strict patch-coverage obligation — tests were still written to full parity with the sibling loopover_miner_get_governor_decisions tool's coverage (has-signal branch, no-signal branch, store-ownership invariant), plus a new row in the shared miner-mcp-contract.test.ts invariant table.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

If any required check was skipped, explain why:

  • Auth/CORS and UI boxes are not applicable — this is a local, offline, read-only MCP tool with no auth/session/UI surface (the stdio server has no network listener).

UI Evidence

Not applicable — no visible UI/frontend/docs/extension change beyond the README's MCP tool list, which is covered by the existing miner MCP tool documentation parity test.

Notes

  • Follows the same injection-seam (options.initPredictionLedger / options.initEventLedger) and explicit store-ownership finally pattern as the sibling loopover_miner_get_governor_decisions tool.

Closes #5821

@oktofeesh1
oktofeesh1 requested a review from JSONbored as a code owner July 14, 2026 22:19
@superagent-security

Copy link
Copy Markdown
Contributor

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

@JSONbored
JSONbored marked this pull request as draft July 14, 2026 22:27
@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 14, 2026
@loopover-orb

loopover-orb Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Warning

LoopOver found maintainer review notes

Scoped related-work signals were found for this PR. They are advisory unless the gate reports a blocker.

Readiness score: 57/100

Signal Result Evidence Action
Linked issue ✅ Linked #5821 No action.
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden. Review top overlaps.
Change scope ❌ 8/20 High review scope from cached public metadata (1 linked issue). Add a concise scope and risk note.
Validation posture ❌ 5/25 Preflight is holding this PR: the review lane is unavailable, so it is not ready for automated review. Await review-lane availability.
Contributor workload ✅ 10/10 Author activity: 55 registered-repo PR(s), 43 merged, 0 issue(s). No action.
Contributor context ✅ Confirmed Gittensor contributor oktofeesh1; Gittensor profile; 55 PR(s), 0 issue(s). No action.
Gate result ⚠️ Advisory only Advisory only. No action.
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.
Review context
  • Author: oktofeesh1
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local LoopOver cache.
  • Public profile languages: not available
  • Official Gittensor activity: 55 PR(s), 0 issue(s).
  • Related work: Titles/paths share 6 meaningful terms. (PR #5905)
  • Related work: Titles/paths share 8 meaningful terms. (PR #5906)
  • Related work: Titles/paths share 6 meaningful terms. (PR #5905, PR #5906)
Maintainer notes
  • Repo lane is not ready for a confident recommendation: Repository registration is not available in the local LoopOver cache.
  • Possible duplicate or overlapping work: 3 related open work cluster(s) were detected.
Contributor next steps
  • Start here: Review top overlaps.
  • Then work through the remaining 5 steps in the Signals table above.
  • Re-run LoopOver review

💰 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.

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.15%. Comparing base (1b62bf0) to head (9abd466).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5909   +/-   ##
=======================================
  Coverage   95.15%   95.15%           
=======================================
  Files         589      589           
  Lines       46695    46695           
  Branches    14902    14902           
=======================================
  Hits        44434    44434           
  Misses       1511     1511           
  Partials      750      750           
Flag Coverage Δ
shard-1 43.55% <ø> (-0.40%) ⬇️
shard-2 36.17% <ø> (+0.12%) ⬆️
shard-3 31.90% <ø> (-0.15%) ⬇️
shard-4 31.97% <ø> (-0.90%) ⬇️
shard-5 32.39% <ø> (+0.88%) ⬆️
shard-6 44.90% <ø> (+0.35%) ⬆️

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

Files with missing lines Coverage Δ
packages/loopover-miner/lib/calibration-cli.js 100.00% <ø> (ø)

Add loopover_miner_get_calibration_report to the miner's stdio MCP
server, wrapping the existing local prediction-ledger/event-ledger
join (calibration-cli.js's toPredictionRecords/toOutcomeRecords +
calibration.js's buildCalibrationReport) that already powers
`loopover-miner calibration --json`. No new join/scoring logic; an
MCP client can now ask for this miner's own merge/close prediction
accuracy without shelling out to the CLI. Follows the same
injection-seam and store-ownership pattern as the sibling
loopover_miner_get_governor_decisions tool.

Closes JSONbored#5821
@oktofeesh1
oktofeesh1 force-pushed the feat/miner-calibration-report-mcp-tool-5821 branch from 0c71cea to 9abd466 Compare July 15, 2026 02:13
@JSONbored
JSONbored marked this pull request as ready for review July 15, 2026 04:27
@JSONbored
JSONbored merged commit 7e36a60 into JSONbored:main Jul 15, 2026
16 checks passed
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): expose the miner-local calibration report as a read-only MCP tool (loopover_miner_get_calibration_report)

2 participants