Skip to content

feat(mcp): make loopover_lint_pr_text work offline in the local CLI by exposing the shared engine.ts logic #6268

Description

@JSONbored

Context

Concrete instance of #6227's shared-core question, same pattern as the sibling loopover_check_slop_risk issue. loopover_lint_pr_text's canonical logic already lives in packages/loopover-engine/src/signals/engine.tssrc/mcp/server.ts:3086-3092 (remote) calls it via buildPrTextLint, imported through src/signals/engine.ts, itself a pure re-export shim over the engine copy. packages/loopover-mcp/bin/loopover-mcp.js:786-792 (local) instead proxies over HTTP (apiPost("/v1/lint/pr-text", input)), even though the local package already depends on @loopover/engine. The blocker is the same as the sibling issue: the engine package's exports map doesn't expose whatever sub-path buildPrTextLint needs.

Requirements

  • Add the necessary exports map entry to packages/loopover-engine/package.json for buildPrTextLint (or the specific module path it lives at within signals/engine.ts — check whether this needs its own named export sub-path or can share one with the sibling slop-risk export).
  • Update packages/loopover-mcp/bin/loopover-mcp.js's loopover_lint_pr_text tool handler to call buildPrTextLint directly from @loopover/engine instead of apiPost.
  • Keep the remote server's behavior unchanged.

Test Coverage Requirements

99%+ Codecov patch coverage; a regression test confirming the local tool works without a network call.

Deliverables

  • @loopover/engine exports the necessary path for buildPrTextLint.
  • Local loopover_lint_pr_text computes the result in-process.

Expected Outcome

A user running the local MCP server can lint PR text fully offline, matching the remote server's existing in-process behavior.

Links & Resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions