Skip to content

fix(mcp): loopover-mcp --help doesn't document LOOPOVER_LOGIN despite 6 commands requiring it #5930

Description

@JSONbored

Context

Six different subcommands in packages/loopover-mcp/bin/loopover-mcp.js resolve a GitHub login the
same way and, when it's missing, throw the same error pointing the user at an environment variable:

const contributorLogin = options.login ?? process.env.LOOPOVER_LOGIN ?? process.env.GITHUB_LOGIN;
if (!contributorLogin) throw new Error("Pass --login <github-login> or set LOOPOVER_LOGIN.");

This appears at the shared analyze-branch/preflight dispatch (~L1855-1856), reviewPrCli
(~L1927-1928), decisionPackCli (~L2164-2165), repoDecisionCli (~L2177-2178), and twice inside
runAgentCli for the plan and packet subcommands (~L2224-2225, ~L2243-2244) — seven call sites
in six commands total.

printHelp() (~L2543) has a dedicated Environment: block listing every environment variable the
CLI reads:

Environment:
LOOPOVER_API_URL
LOOPOVER_PROFILE
LOOPOVER_CONFIG_PATH or LOOPOVER_CONFIG_DIR
LOOPOVER_API_TOKEN, LOOPOVER_MCP_TOKEN, LOOPOVER_TOKEN, or a session from loopover-mcp login
GITHUB_TOKEN for non-interactive login bootstrap
GITTENSOR_SCORE_PREVIEW_CMD
GITTENSOR_ROOT
GITTENSOR_SCORE_PREVIEW_TIMEOUT_MS
LOOPOVER_UPLOAD_SOURCE=false

LOOPOVER_LOGIN and GITHUB_LOGIN are never mentioned, even though the runtime error message for
six different commands explicitly tells the user to set LOOPOVER_LOGIN. A user who runs
loopover-mcp --help to find out what environment variables exist has no way to discover this one
short of triggering the error first.

Requirements

  • Add LOOPOVER_LOGIN (and, since it's an accepted fallback in the same ?? chain, GITHUB_LOGIN)
    to the Environment: block in printHelp(), with a one-line description matching the style of the
    existing entries (e.g. LOOPOVER_LOGIN or GITHUB_LOGIN for --login on analyze-branch, preflight, review-pr, decision-pack, repo-decision, and agent plan/packet).
  • No behavior change — this is a help-text-only fix. Do not alter the resolution order or the thrown
    error message.

Deliverables

  • LOOPOVER_LOGIN/GITHUB_LOGIN added to printHelp()'s Environment: block in
    packages/loopover-mcp/bin/loopover-mcp.js.
  • A regression test (in test/unit/mcp-cli-basics.test.ts or wherever loopover-mcp --help's
    output is already asserted on) verifying the help text mentions LOOPOVER_LOGIN, so a future
    edit can't silently drop it again.

Test Coverage Requirements

packages/loopover-mcp/bin/loopover-mcp.js is outside this repo's Codecov coverage.include
(see vitest.config.ts's coverage.include, limited to src/**, packages/loopover-engine/src/**,
packages/loopover-miner/lib/**, and one review-enrichment file), so this change isn't Codecov-gated.
printHelp() is a process.stdout.write call with no branches; the substring assertion on
loopover-mcp --help's stdout added above is the only coverage that matters here, and it must run
through the existing test/unit/mcp-cli-*.test.ts subprocess suite (npm run test:mcp-pack/test:ci)
so a future edit can't silently drop the line again.

Expected Outcome

loopover-mcp --help documents LOOPOVER_LOGIN/GITHUB_LOGIN alongside every other environment
variable the CLI reads, so a user doesn't have to trigger a runtime error to discover it.

Links & Resources

  • packages/loopover-mcp/bin/loopover-mcp.jsprintHelp() (~L2543), the six LOOPOVER_LOGIN ?? GITHUB_LOGIN call sites listed above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions