Skip to content

feat(mcp): expose repo registration readiness as a read-only MCP tool - #5906

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
nghetienhiep:fix/issue-5824
Jul 15, 2026
Merged

feat(mcp): expose repo registration readiness as a read-only MCP tool#5906
JSONbored merged 1 commit into
JSONbored:mainfrom
nghetienhiep:fix/issue-5824

Conversation

@nghetienhiep

Copy link
Copy Markdown
Contributor

Summary

  • Add loopover_get_registration_readiness, a read-only MCP tool that wraps the existing buildRegistrationReadinessResponse route handler (GET /v1/repos/:owner/:repo/registration-readiness) so MCP clients can pull a repo's registration-readiness report without direct REST access.
  • The tool follows the loopover_get_repo_onboarding_pack pattern next to it: ownerRepoShape input, a structured output schema, and the same generic requireRepoAccess auth tier as loopover_get_repo_context (no extra session-only gate, matching the underlying HTTP route).
  • Wire the new tool into the repo-owner-intake MCP client profile's recommendedTools, which already names the readiness prompt but had no backing tool.

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

If any required check was skipped, explain why:

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. — N/A, no UI changes.
  • Visible UI changes include a UI Evidence section below with screenshots. — N/A, no visible UI change; this is a backend/MCP-only PR.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

N/A — no UI, frontend, or docs changes in this PR.

Notes

  • buildRegistrationReadinessResponse is exported from src/api/routes.ts (previously module-private) so the MCP tool can call it directly instead of round-tripping through HTTP, per the issue's explicit requirement not to reimplement buildRegistrationReadiness's signal logic.
  • Tests cover a fully-ready repo, a registered repo with outstanding readiness gaps (fragile config + blocked contributor intake), and the not-registered/unregistered-repo case, plus the existing repo-access forbidden path.

Closes #5824

@nghetienhiep
nghetienhiep requested a review from JSONbored as a code owner July 14, 2026 22:15
@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 #5824 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: 52 registered-repo PR(s), 23 merged, 0 issue(s). No action.
Contributor context ✅ Confirmed Gittensor contributor nghetienhiep; Gittensor profile; 52 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: nghetienhiep
  • 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: 52 PR(s), 0 issue(s).
  • Related work: Titles/paths share 6 meaningful terms. (PR #5905)
  • Related work: Titles/paths share 8 meaningful terms. (PR #5909)
  • Related work: Titles/paths share 6 meaningful terms. (PR #5905, PR #5909)
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 (f7266c4).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5906   +/-   ##
=======================================
  Coverage   95.15%   95.15%           
=======================================
  Files         589      589           
  Lines       46695    46703    +8     
  Branches    14902    14903    +1     
=======================================
+ Hits        44434    44442    +8     
  Misses       1511     1511           
  Partials      750      750           
Flag Coverage Δ
shard-1 43.94% <25.00%> (-0.01%) ⬇️
shard-2 36.17% <25.00%> (+0.12%) ⬆️
shard-3 32.08% <100.00%> (+0.02%) ⬆️
shard-4 32.85% <25.00%> (-0.03%) ⬇️
shard-5 31.50% <25.00%> (-0.01%) ⬇️
shard-6 44.55% <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.42% <ø> (ø)
src/mcp/server.ts 95.97% <100.00%> (+0.03%) ⬆️

Add loopover_get_registration_readiness, wrapping the existing
buildRegistrationReadinessResponse route handler so MCP clients can pull
a repo's registration-readiness report without direct REST access. Wire
it into the repo-owner-intake profile's recommendedTools, which already
named the readiness prompt but had no backing tool.

Closes JSONbored#5824
@JSONbored
JSONbored marked this pull request as ready for review July 15, 2026 04:26
@JSONbored
JSONbored merged commit afad22e 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 repo registration readiness as a read-only MCP tool (loopover_get_registration_readiness)

2 participants