Skip to content

fix(mcp): honor --help on the contributor-profile CLI command#7038

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
shin-core:fix/contributor-profile-cli-help-6992
Jul 17, 2026
Merged

fix(mcp): honor --help on the contributor-profile CLI command#7038
JSONbored merged 1 commit into
JSONbored:mainfrom
shin-core:fix/contributor-profile-cli-help-6992

Conversation

@shin-core

Copy link
Copy Markdown
Contributor

What

contributorProfileCli (packages/loopover-mcp/bin/loopover-mcp.js), the CLI mirror of loopover_get_contributor_profile, had no --help handling. Every sibling command around it does — decisionPackCli, monitorOpenPrsCli, repoDecisionCli. Running loopover-mcp contributor-profile --help fell through to login resolution and threw "Pass --login <github-login>, log in with \loopover-mcp login`, or set LOOPOVER_LOGIN."` instead of printing usage.

How

Add printContributorProfileHelp() and an if (options.help === true) return printContributorProfileHelp(); guard at the top of the command, mirroring decisionPackCli exactly. The help text documents the usage, the --login/--json flags, and the login-resolution precedence.

Validation

Test added to the existing test/unit/mcp-cli-contributor-profile.test.ts (rather than a parallel file): contributor-profile --help prints usage with no --login and no fixture server, and never emits the Pass --login error. Confirmed it fails against the unfixed command and passes with the fix. build:mcp and test:mcp-pack pass; sibling CLI tests remain green.

Closes #6992

contributorProfileCli had no `if (options.help === true)` short-circuit,
unlike every sibling command around it (decisionPackCli, monitorOpenPrsCli,
repoDecisionCli). `loopover-mcp contributor-profile --help` fell through to
login resolution and threw "Pass --login ..." instead of printing usage.

Add printContributorProfileHelp() and the --help guard at the top of the
command, mirroring decisionPackCli.

Closes JSONbored#6992
@shin-core
shin-core requested a review from JSONbored as a code owner July 17, 2026 18:58
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 17, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@superagent-security

Copy link
Copy Markdown
Contributor

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

@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.74%. Comparing base (a752b8f) to head (dee57ea).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7038   +/-   ##
=======================================
  Coverage   93.74%   93.74%           
=======================================
  Files         692      692           
  Lines       68740    68740           
  Branches    18768    18768           
=======================================
  Hits        64443    64443           
  Misses       3302     3302           
  Partials      995      995           
Flag Coverage Δ
shard-1 43.79% <ø> (ø)
shard-2 36.84% <ø> (ø)
shard-3 33.35% <ø> (ø)
shard-4 33.90% <ø> (ø)
shard-5 32.21% <ø> (ø)
shard-6 45.76% <ø> (ø)

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

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 17, 2026
@loopover-orb

loopover-orb Bot commented Jul 17, 2026

Copy link
Copy Markdown

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-17 19:21:43 UTC

2 files · 1 AI reviewer · no blockers · CI green · unstable

⏸️ Suggested Action - Manual Review

Review summary
This PR adds a printContributorProfileHelp() function and an early --help guard to contributorProfileCli, mirroring the existing pattern used by decisionPackCli and other sibling commands. The fix is correctly placed before login resolution, matching the exact bug described (help falling through to the login error). A test is added to the existing test file that exercises the real fix by confirming --help works with no --login/session/env vars set and never triggers the login error.

Nits — 3 non-blocking
  • The file packages/loopover-mcp/bin/loopover-mcp.js is very large (~3891 lines per the external brief); this isn't introduced by this diff but is worth noting for future refactoring.
  • The help text in printContributorProfileHelp() is a near-duplicate pattern of printDecisionPackHelp() and other sibling help functions — consider a shared help-text builder to reduce duplication across the CLI, though this is consistent with existing conventions in the file.
  • Consider extracting a shared helper for the repeated 'Usage: ... [--json]' + login-resolution-precedence boilerplate across the sibling CLI help functions to reduce future drift when the precedence order changes.
Flagged checks (non-blocking)
  • Contributor trust — Contributor flagged for review

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 #6992
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: 55 registered-repo PR(s), 33 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor shin-core; Gittensor profile; 55 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Review context
  • Author: shin-core
  • 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: 55 PR(s), 0 issue(s).
  • Related work: Titles/paths share 9 meaningful terms. (PR #7005, PR #7004)
  • Related work: Titles/paths share 9 meaningful terms. (PR #7004, PR #7003)
  • Related work: Titles/paths share 9 meaningful terms. (PR #7004, PR #7002)
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 added the manual-review Gittensor contributor context label Jul 17, 2026
@JSONbored
JSONbored merged commit 4ac395a into JSONbored:main Jul 17, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

contributor-profile CLI command doesn't support --help

2 participants