Skip to content

feat(mcp): add maintain onboarding-pack CLI mirror#6913

Merged
loopover-orb[bot] merged 2 commits into
JSONbored:mainfrom
jsdevninja:feat/onboarding-pack-cli
Jul 17, 2026
Merged

feat(mcp): add maintain onboarding-pack CLI mirror#6913
loopover-orb[bot] merged 2 commits into
JSONbored:mainfrom
jsdevninja:feat/onboarding-pack-cli

Conversation

@jsdevninja

Copy link
Copy Markdown
Contributor

Summary

  • Add loopover-mcp maintain onboarding-pack --repo owner/repo [--refresh] as a session-authenticated CLI mirror of loopover_get_repo_onboarding_pack / GET /v1/repos/:owner/:repo/onboarding-pack/preview.
  • Forward --refresh as ?refresh=true|false, keep plain/--json output consistent with the other maintain subcommands, and register the subcommand for shell completion.
  • Add unit coverage that asserts CLI JSON output parity with the API payload and verifies both refresh query branches.

Closes #6738

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:

  • Focused validation covered the CLI change itself: npx vitest run test/unit/mcp-cli-maintain.test.ts test/unit/mcp-cli-completion-spec.test.ts, npm run build:mcp, and npm run typecheck. Codecov patch does not measure packages/**/test/**. Remaining skipped boxes are unchanged by this PR and will be exercised by GitHub CI. Local npm pack --dry-run for @loopover/mcp succeeds; the wrapper test:mcp-pack script failed locally with a non-informative npm pack failed message after that dry-run succeeded.

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.

UI Evidence

N/A — CLI-only maintainer command; no visible UI change.

Notes

  • This intentionally stays a thin CLI proxy over the existing session-gated API, matching maintain pause/resume/set-level/precision. Artificial extra files/padding were avoided because they raise slop risk and would weaken the one-shot gate odds.

Add a session-authenticated maintain onboarding-pack subcommand that
proxies GET /v1/repos/:owner/:repo/onboarding-pack/preview, including the
optional refresh query, so maintainers can preview the same pack from the CLI.

Closes JSONbored#6738

Co-authored-by: Cursor <cursoragent@cursor.com>
@jsdevninja
jsdevninja requested a review from JSONbored as a code owner July 17, 2026 12:41
@superagent-security

Copy link
Copy Markdown
Contributor

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

Omit the refresh query unless --refresh is set, matching the maintain
precision GET pattern, and update the PowerShell completion expectation.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.70%. Comparing base (64abfab) to head (ba0158b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6913   +/-   ##
=======================================
  Coverage   93.70%   93.70%           
=======================================
  Files         685      685           
  Lines       68313    68313           
  Branches    18723    18723           
=======================================
  Hits        64014    64014           
  Misses       3302     3302           
  Partials      997      997           
Flag Coverage Δ
shard-1 43.67% <ø> (ø)
shard-2 36.84% <ø> (+0.06%) ⬆️
shard-3 32.77% <ø> (+0.11%) ⬆️
shard-4 34.70% <ø> (-0.14%) ⬇️
shard-5 31.92% <ø> (ø)
shard-6 45.47% <ø> (ø)

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 17, 2026
@loopover-orb

loopover-orb Bot commented Jul 17, 2026

Copy link
Copy Markdown

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-17 12:54:35 UTC

4 files · 1 AI reviewer · no blockers · readiness 82/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR adds an `onboarding-pack` subcommand to the maintain CLI that mirrors the existing REST/tool endpoint, following the established pattern of other maintain subcommands (query forwarding, plain/JSON output via `emit`, help text, completion registration). The refresh query logic is a straightforward ternary (`--refresh` -> `?refresh=true`, otherwise omitted) and matches the fixture server's accepted branches (`null` or `"true"`), and the test asserts both the JSON payload parity and the exact request URLs for both branches. The change is narrow, well-tested, and consistent with the surrounding CLI conventions (e.g. precision subcommand) already in the file.

Nits — 3 non-blocking
  • The fixture server in mcp-cli-harness.ts only 200s when `refresh` is `null` or `"true"`; any other value falls through unhandled, but since the CLI's ternary only ever emits `""` or `"true"` this is fine — worth a one-line comment noting the fixture intentionally doesn't cover a `refresh=false` request since the CLI never sends one.
  • packages/loopover-mcp/bin/loopover-mcp.js: the inline comment above the onboarding-pack handler is quite long for a single subcommand; consider trimming to the essential behavior note now that the pattern is established elsewhere in the file.
  • Confirm `--json` output for `onboarding-pack` intentionally returns the full `payload` (not just `payload.preview`) to match `repoOnboardingPackFixture` in the test, since the plain-text branch unwraps `payload.preview ?? payload` but the JSON branch does not — this asymmetry is correct per the test but worth a one-line clarifying comment for future readers.

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 #6738
Related work ⚠️ 3 scoped overlaps Top overlaps are listed below; lower-confidence bulk is hidden.
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: 203 registered-repo PR(s), 130 merged, 40 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jsdevninja; Gittensor profile; 203 PR(s), 40 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Partially addressed
The PR adds the CLI subcommand mirroring the API/tool with --refresh support, help text, shell completion, and a unit test asserting output parity with the fixture and refresh-branch behavior, satisfying the core requirements. However, it lacks direct evidence of ≥99% patch coverage verification and did not run npm run test:coverage/test:workers per the PR's own checklist, so the strict test-cover

Review context
  • Author: jsdevninja
  • 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: 203 PR(s), 40 issue(s).
  • Related work: Titles/paths share 8 meaningful terms. (issue #6735, issue #6738)
  • Related work: Titles/paths share 8 meaningful terms. (issue #6738, issue #6737)
  • Related work: Titles/paths share 8 meaningful terms. (issue #6738, issue #6736)
  • Additional title-only matches omitted; title-only overlap does not block.
Contributor next steps
  • Start here: Review top overlaps.
  • 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

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 96ee9c4 into JSONbored:main Jul 17, 2026
16 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 17, 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.

CLI mirror for loopover_get_repo_onboarding_pack

1 participant