Skip to content

chore(mcp): remove dead referenceScorePreviewCommand export in lib/local-branch.js #6259

Description

@JSONbored

Context

packages/loopover-mcp/lib/local-branch.js:202-206 exports referenceScorePreviewCommand, which computes the real absolute path to the bundled scorer script via packageRoot. It's never called from bin/loopover-mcp.js or src/mcp/server.ts — its only caller is test/unit/local-scorer-adapter.test.ts:99-100. Production guidance text instead always uses the sibling referenceScorePreviewExample, a hardcoded ./node_modules/@loopover/mcp/scripts/... string that assumes a local-install layout.

Requirements

  • Confirm via a fresh repo-wide search that referenceScorePreviewCommand has zero real (non-test) callers.
  • Remove it, along with its dedicated test coverage in test/unit/local-scorer-adapter.test.ts, OR — if the hardcoded referenceScorePreviewExample string is itself a latent bug (it assumes a specific install layout that may not hold for a global npm install), consider whether production guidance text should switch to using the dynamic referenceScorePreviewCommand instead of removing it. Pick whichever direction is correct after reading both functions' actual usage context; note the choice in the PR.

Deliverables

  • Either referenceScorePreviewCommand removed as dead code, or wired into the real guidance-text call site if the hardcoded alternative is found to be the actual bug.

Expected Outcome

No orphaned function remains with only a test as its caller, and guidance text accurately reflects a user's actual install layout.

Links & Resources

  • packages/loopover-mcp/lib/local-branch.js:202-206
  • test/unit/local-scorer-adapter.test.ts:99-100

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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions