chore(mcp): convert lib/local-branch to TypeScript - #7420
chore(mcp): convert lib/local-branch to TypeScript#7420lourincedaging0-commits wants to merge 1 commit into
Conversation
Phase 2 of the packages/loopover-mcp TypeScript migration (JSONbored#7291), on the tsc build pipeline from Phase 1 (JSONbored#7409). Port lib/local-branch.js to lib/local-branch.ts; it compiles in place to lib/local-branch.js (inline source map, no .d.ts) -- the same file set the package already ships, so no import path changes. Runtime behavior and the public export surface are unchanged; bin/loopover-mcp.js and test/unit/local-scorer-adapter.test.ts consume the compiled .js exactly as before. Types are added at the git-diff / scorer-JSON boundaries as open records, matching the already converted lib/ files, so the strict build stays clean. ci: build the engine package for mcp/miner-scoped changes in validate-code local-branch.ts is the first packages/loopover-mcp/lib file that imports @loopover/engine. Once it is real TypeScript, 'npm run typecheck' pulls it into the root check (a test imports the compiled .js, which resolves to the .ts source) and needs @loopover/engine's built dist/*.d.ts. The Typecheck gate already runs for mcp/miner changes, but 'Build engine package' did not -- so engine was unbuilt at typecheck time and every @loopover/engine import (across mcp, miner and discovery-index) failed to resolve. Widen that step's gate to match Typecheck (and the Turborepo-cache restore just above it). Closes JSONbored#7329
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
1 similar comment
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7420 +/- ##
==========================================
- Coverage 91.27% 91.20% -0.07%
==========================================
Files 716 716
Lines 72972 72999 +27
Branches 21527 21638 +111
==========================================
- Hits 66605 66581 -24
Misses 5327 5327
- Partials 1040 1091 +51
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Caution 🛑 LoopOver review result - reject/close recommendedReview updated: 2026-07-20 09:23:29 UTC
Review summary Blockers
Nits — 6 non-blocking
Why this is blocked
📋 Copy for AI agents — paste into your coding agentCI checks failing
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk 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.
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.
|
|
LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, codecov/patch, validate-code); Linked issue overlaps another open PR; AI reviewers agree on a likely critical defect: packages/loopover-mcp/lib/local-branch.ts imports `join` from `node:path` at the top of the file but never references it anywhere in the port — TS's emit elides it from the compiled `.js` (visible in the .js diff losing `join`), but the dead import itself will fail a strict typecheck/lint pass if `noUnusedLocals` (or similar) is enabled, which lines up with the `validate`/`validate-code` CI failures this exact PR is meant to unblock.; duplicate of open PR #7419). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Phase 2 of the
packages/loopover-mcpTypeScript migration (#7291), on the tsc pipeline from Phase 1 (#7409).What
Port
lib/local-branch.js→lib/local-branch.ts. The tsconfigincludeglob picks it up; it compiles in place tolib/local-branch.js(inline source map, no.d.ts) — the same layout the package already ships. Runtime behavior and the public export surface are unchanged;bin/loopover-mcp.jsandtest/unit/local-scorer-adapter.test.tsconsume the compiled.jsexactly as before. Types are added at the git-diff / scorer-JSON boundaries as open records, matching the already-convertedlib/files.Why the one-line
ci.ymlchange is includedlocal-branchis the firstpackages/loopover-mcp/libfile that imports@loopover/engine. Once it is real TypeScript,npm run typecheckpulls it into the root check (a test imports the compiled.js, which Bundler-resolves to the sibling.ts) and needs@loopover/engine's builtdist/*.d.ts. The Typecheck gate already runs formcp/minerchanges, but Build engine package did not (backend || engine || uionly) — so on an mcp-only change engine was unbuilt at typecheck time and every@loopover/engineimport (mcp, miner, discovery-index) failed to resolve. The laterBuild MCP/Build miner CLIsteps build engine transitively via turbo, but they run after Typecheck. Phase 1 (#7409) didn't hit this because none of its converted files import the engine. The fix widens that one step's gate to match the Typecheck gate (and the Turborepo-cache restore directly above it).Closes #7329