Skip to content

fix(mcp): make decision-pack and repo-decision CLI commands honor --help - #5995

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
nghetienhiep:fix/issue-5927
Jul 15, 2026
Merged

fix(mcp): make decision-pack and repo-decision CLI commands honor --help#5995
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
nghetienhiep:fix/issue-5927

Conversation

@nghetienhiep

Copy link
Copy Markdown
Contributor

Summary

  • decisionPackCli and repoDecisionCli in packages/loopover-mcp/bin/loopover-mcp.js were wired into runCli's dispatch table and CLI_COMMAND_SPEC like every other single-purpose subcommand, but unlike reviewPrCli, lintPrTextCli, validateConfigCli, slopRiskCli, and issueSlopCli, neither one checked for --help, so loopover-mcp decision-pack --help fell straight into the --login requirement and threw a login error instead of printing usage.
  • Adds printDecisionPackHelp() / printRepoDecisionHelp() and short-circuits both commands on options.help === true (the same pattern reviewPrCli already uses, since both commands receive pre-parsed options from runCli, not raw args). No other behavior changed.

Closes #5927

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:

  • packages/loopover-mcp/** is outside this repo's Codecov coverage.include (see vitest.config.ts), so codecov/patch does not numerically measure this change. Behavioral regression coverage is enforced instead by the test/unit/mcp-cli-*.test.ts subprocess suite (run via test:mcp-pack/test:ci), which now asserts both --help invocations print usage and exit 0 without requiring --login/--repo or making a network call. npm run test:coverage passed the full unsharded suite except a pre-existing, unrelated failure in test/unit/selfhost-ams-reporting.test.ts caused by this local environment lacking the sqlite3 binary — reproduces identically with this change stashed out.

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.

Not applicable: no auth/cookie/CORS/session code was touched, and this is a CLI-only change with no UI surface.

UI Evidence

Not applicable — this is a CLI-only change (packages/loopover-mcp/bin/loopover-mcp.js), no UI/frontend/docs surface changed.

Notes

  • The two new printDecisionPackHelp() / printRepoDecisionHelp() functions mirror the wording and structure of the existing print*Help functions in the same file (printReviewPrHelp, printLintPrTextHelp, etc.), including the "No source upload." / "Pass --json for machine-readable output." lines and their Usage: line taken verbatim from printHelp()'s top-level usage listing.

Both commands were fully wired into runCli's dispatch table and
CLI_COMMAND_SPEC but never checked options.help, so --help fell through
to the normal --login/--repo requirement and threw a login error instead
of printing usage, unlike every other single-purpose subcommand in this
CLI family.

Closes JSONbored#5927
@nghetienhiep
nghetienhiep requested a review from JSONbored as a code owner July 15, 2026 06:05
@superagent-security

Copy link
Copy Markdown
Contributor

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

@loopover-orb loopover-orb Bot added gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. gittensor:priority Maintainer-selected Gittensor priority — scores a 1.5x multiplier. labels 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 06:15:12 UTC

2 files · 1 AI reviewer · no blockers · readiness 80/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR adds --help short-circuits to decisionPackCli and repoDecisionCli, mirroring the existing pattern used by reviewPrCli and other CLI commands, so that --help prints usage instead of throwing a login error. The change is minimal, follows an established convention exactly, and includes tests verifying the help output for both commands without requiring --login/--repo or a network call. It closes issue #5927 and is narrowly scoped with no unrelated changes.

Nits — 3 non-blocking
  • The help text strings in printDecisionPackHelp and printRepoDecisionHelp duplicate formatting boilerplate (array + join + trailing newline) already used elsewhere in the file for similar help printers; consider a shared helper if this pattern repeats further.
  • Tests only assert substring matches via toMatch rather than exact output equality, which is fine for this kind of test but slightly loosens coverage of exact usage text.
  • Consider extracting a small `printUsage(lines)` helper to DRY up the repeated `[...].join("\n") + "\n"` pattern across the various CLI help printers in loopover-mcp.js.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #5927
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: 56 registered-repo PR(s), 28 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor nghetienhiep; Gittensor profile; 56 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 printDecisionPackHelp()/printRepoDecisionHelp() and short-circuits both CLIs on options.help === true before the --login check, matching the reviewPrCli pattern, and adds regression tests asserting --help output without requiring --login/--repo.

Review context
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 <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> 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 15e15a4 into JSONbored:main Jul 15, 2026
14 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 15, 2026
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. gittensor:priority Maintainer-selected Gittensor priority — scores a 1.5x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(mcp): loopover-mcp decision-pack and repo-decision ignore --help

1 participant