Skip to content

feat(mcp): expose .loopover.yml config recommendations as a read-only MCP tool - #6016

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
oktofeesh1:feat/mcp-config-recommendation-tool-5823
Jul 15, 2026
Merged

feat(mcp): expose .loopover.yml config recommendations as a read-only MCP tool#6016
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
oktofeesh1:feat/mcp-config-recommendation-tool-5823

Conversation

@oktofeesh1

Copy link
Copy Markdown
Contributor

Summary

  • Add a new read-only MCP tool loopover_get_config_recommendation to src/mcp/server.ts, wrapping the existing buildGittensorConfigRecommendationResponse (src/api/routes.ts) exactly like the sibling loopover_get_registration_readiness/loopover_get_label_audit tools, so MCP clients can fetch .loopover.yml recommendations without direct REST access.
  • Register the new tool in the repo-owner-intake MCP client profile's recommendedTools list (packages/loopover-mcp/bin/loopover-mcp.js), since that profile's stated purpose already names config recommendations but had no tool for it.
  • Closes feat(mcp): expose .loopover.yml config recommendations as a read-only MCP tool (loopover_get_config_recommendation) #5823

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

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.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

Notes

  • No UI changes in this PR (MCP server + CLI profile config only), so the UI Evidence section is not applicable.
  • The tool wraps the existing buildGittensorConfigRecommendationResponse handler unmodified (aside from exporting it) — no changes to the underlying recommendation logic, per the issue's explicit instruction not to reimplement buildGittensorConfigRecommendation.
  • Auth: uses requireRepoAccess, matching the real REST route's auth tier (no additional gate) and the precedent set by the already-shipped loopover_get_registration_readiness tool, which exposes adjacent economics-adjacent data at the same tier.
  • The tool's summary line branches on report.warnings.length (not reasons.length, which is always non-empty by construction) so both the "no outstanding warnings" and "warning(s) to review" branches are genuinely reachable and are each covered by a dedicated test.

… MCP tool

Add loopover_get_config_recommendation, mirroring the existing
loopover_get_registration_readiness tool: read-only, requireRepoAccess-gated,
advisory only (never writes config). Wire it into the repo-owner-intake
agent profile's recommended tools.
@oktofeesh1
oktofeesh1 requested a review from JSONbored as a code owner July 15, 2026 06:53
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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.16%. Comparing base (a211791) to head (70d6eed).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6016   +/-   ##
=======================================
  Coverage   95.16%   95.16%           
=======================================
  Files         591      591           
  Lines       46934    46942    +8     
  Branches    15000    15001    +1     
=======================================
+ Hits        44664    44672    +8     
  Misses       1512     1512           
  Partials      758      758           
Flag Coverage Δ
shard-1 43.93% <25.00%> (-0.01%) ⬇️
shard-2 36.54% <25.00%> (+<0.01%) ⬆️
shard-3 32.16% <25.00%> (+0.16%) ⬆️
shard-4 32.94% <25.00%> (+0.98%) ⬆️
shard-5 31.47% <100.00%> (-1.07%) ⬇️
shard-6 44.57% <25.00%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
src/api/routes.ts 94.40% <ø> (ø)
src/mcp/server.ts 96.13% <100.00%> (+0.03%) ⬆️

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

loopover-orb Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-15 07:12:54 UTC

5 files · 1 AI reviewer · no blockers · readiness 98/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR wraps the existing buildGittensorConfigRecommendationResponse in a new read-only MCP tool loopover_get_config_recommendation, mirroring the sibling registration-readiness/label-audit tools exactly (access check via requireRepoAccess, toolResult wrapping, output schema, registration in the tools-with-output-schema test list). It exports the previously-private function, registers the tool in the repo-owner-intake profile's recommendedTools list matching that profile's stated purpose, and adds tests covering the clean/no-warnings path, the warnings path, and the access-denied path. The wiring is consistent with the established pattern and the change is narrowly scoped to this one feature.

Nits — 4 non-blocking
  • src/mcp/server.ts: the summary string duplicates the 'advisory only, not a write action' phrase already stated in the tool description — consider trimming one of the two for conciseness.
  • test/unit/mcp-config-recommendation.test.ts: the forbids-access test doesn't assert the tool's structuredContent/data is empty or absent on the error path, only that isError is true — worth confirming no partial config data leaks on the error response.
  • Consider adding a coverage assertion or comment noting that the /* v8 ignore start */ block in src/api/routes.ts still applies now that the function is exported, since exporting could change v8's branch instrumentation boundaries.
  • Double check that outputSchema optional fields (current, recommended) align with the null current value asserted in the first test — z.unknown().optional() will pass through null fine, but worth a one-line note for future readers.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #5823
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: 55 registered-repo PR(s), 45 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor oktofeesh1; Gittensor profile; 55 PR(s), 0 issue(s).
Gate result ✅ Passing No configured blocker found.
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The diff adds loopover_get_config_recommendation to src/mcp/server.ts with ownerRepoShape input, an output schema, and a handler that calls the exported buildGittensorConfigRecommendationResponse directly (exporting it from routes.ts rather than reimplementing logic), matches the described advisory/no-write semantics, and registers the tool in the repo-owner-intake profile's recommendedTools as re

Review context
  • Author: oktofeesh1
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: JavaScript, MDX, Python, TypeScript
  • Official Gittensor activity: 55 PR(s), 0 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://gittensory.aethereal.dev/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 3912e7d 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 .loopover.yml config recommendations as a read-only MCP tool (loopover_get_config_recommendation)

1 participant