Skip to content

fix(mcp): honor --help for analyze-branch and preflight#6326

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
bohdansolovie:fix/mcp-analyze-preflight-help-6256
Jul 16, 2026
Merged

fix(mcp): honor --help for analyze-branch and preflight#6326
JSONbored merged 1 commit into
JSONbored:mainfrom
bohdansolovie:fix/mcp-analyze-preflight-help-6256

Conversation

@bohdansolovie

Copy link
Copy Markdown
Contributor

Summary

  • Adds the same --help early-return other loopover-mcp subcommands already use for analyze-branch and preflight, before --login / git+network work begins.
  • loopover-mcp analyze-branch --help and loopover-mcp preflight --help now print the shared usage text from printHelp() instead of failing on a missing login.
  • Adds focused CLI regression coverage for both commands (#6256).

Closes #6256

Scope

  • Code changes stay inside packages/loopover-mcp/bin/loopover-mcp.js + matching unit test
  • No other subcommand dispatch changed
  • Reuses existing printHelp() output (already documents both commands)

Validation

  • Unit tests updated (test/unit/mcp-cli-analyze-branch.test.ts)
  • Focused coverage for the exact failure mode in #6256
  • CI on this PR (will mark ready after green)

Safety

  • Diff is limited to CLI help dispatch for two commands
  • No scheme / economics / protocol changes
  • Non-help paths are unchanged

Made with Cursor

Both commands previously skipped the --help check that every sibling
subcommand uses, so `loopover-mcp analyze-branch --help` required
--login and hit git/network instead of printing usage.

Closes JSONbored#6256

Co-authored-by: Cursor <cursoragent@cursor.com>
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 16, 2026
@loopover-orb

loopover-orb Bot commented Jul 16, 2026

Copy link
Copy Markdown

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-16 04:27:35 UTC

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

⏸️ Suggested Action - Manual Review

Review summary
This diff adds a single early `--help` check inside the shared command-dispatch path in `runCli` (packages/loopover-mcp/bin/loopover-mcp.js:1960), returning `printHelp()` before the `--login`/network work runs, and adds two focused unit tests exercising `analyze-branch --help` and `preflight --help`. The fix is small, targeted, closes #6256, and matches the pattern used for other subcommands. The one point I can't confirm from the diff alone is whether `analyze-branch` and `preflight` truly share this exact code branch (so one insertion covers both) — the tests assert both work, which is reassuring, but I'd want to see that both subcommand branches route through this same check before merging.

Nits — 5 non-blocking
  • Verify `run` (added to the import list in test/unit/mcp-cli-analyze-branch.test.ts:3) is actually exported from `./support/mcp-cli-harness` — the diff only shows it being imported, not defined.
  • Confirm that `preflight` dispatches through the same code path as `analyze-branch` shown at loopover-mcp.js:1960; if it's a separate branch elsewhere, this fix may only cover `analyze-branch` despite the test claiming both.
  • The inline comment referencing `fix(mcp): analyze-branch and preflight silently ignore --help, unlike every other loopover-mcp subcommand #6256` is fine, but consider stating explicitly in a comment or test name that this guard must run before the login/network branch, since that ordering is the entire point of the fix.
  • Add a small comment or assertion in the test verifying no git/network calls occur when `--help` is passed (e.g., spy on the git-invoking function) to make the regression coverage more airtight against future reordering.
  • If `preflight` doesn't share this branch, add the same one-line guard for it explicitly rather than relying on shared dispatch.
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 #6256
Related work ⚠️ 1 scoped overlap 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: 82 registered-repo PR(s), 29 merged, 6 issue(s).
Contributor context ✅ Confirmed Gittensor contributor bohdansolovie; Gittensor profile; 82 PR(s), 6 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Review context
  • Author: bohdansolovie
  • 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: 82 PR(s), 6 issue(s).
  • Related work: Titles/paths share 8 meaningful terms. (issue #6253, issue #6259)
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://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

@bohdansolovie bohdansolovie marked this pull request as ready for review July 16, 2026 02:09
@bohdansolovie bohdansolovie requested a review from JSONbored as a code owner July 16, 2026 02:09
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 16, 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.

@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.

@JSONbored JSONbored merged commit bc7e84d into JSONbored:main Jul 16, 2026
13 of 14 checks passed
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.60%. Comparing base (44570d0) to head (860f777).
⚠️ Report is 42 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6326   +/-   ##
=======================================
  Coverage   95.60%   95.60%           
=======================================
  Files         596      596           
  Lines       47121    47121           
  Branches    14999    14999           
=======================================
  Hits        45049    45049           
  Misses       1290     1290           
  Partials      782      782           
Flag Coverage Δ
shard-1 44.13% <ø> (ø)
shard-2 36.51% <ø> (ø)
shard-3 32.40% <ø> (ø)
shard-4 34.39% <ø> (-0.01%) ⬇️
shard-5 31.89% <ø> (ø)
shard-6 44.78% <ø> (ø)

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

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(mcp): analyze-branch and preflight silently ignore --help, unlike every other loopover-mcp subcommand

2 participants