fix(ci): build mcp/miner before test:coverage in test:ci - #7873
Merged
Conversation
npm run test:ci built @loopover/mcp and @loopover/miner (build:mcp/ build:miner) after test:coverage, but packages/loopover-mcp and packages/loopover-miner ship .ts source only -- bin/*.js and lib/*.js are gitignored. Every mcp-cli-*/miner-* test that spawns the compiled CLI via StdioClientTransport with a hardcoded bin/loopover-mcp.js or bin/loopover-miner.js path needs those binaries to already exist on disk, so a fresh checkout's local test:coverage step failed with McpError: MCP error -32000: Connection closed (root cause: MODULE_NOT_FOUND on the missing compiled bin). CI's own validate-tests job already builds engine, MCP, and miner before its "Test with coverage" step -- only the local composite script was out of order. Move build:mcp/build:miner next to the already-correctly-ordered engine/discovery-index builds, ahead of typecheck and test:coverage, matching CI. test:mcp-pack/test:miner-pack keep their existing position: they still run after their respective builds, just much earlier in the pipeline now. Verified by deleting the gitignored mcp/miner build artifacts from a clean state to reproduce the failure, then confirming the corrected order builds both binaries before test:coverage runs and the full local gate (npm run test:ci) passes end to end.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
loopover-ui | 98c2c99 | Commit Preview URL Branch Preview URL |
Jul 21 2026, 03:40 PM |
Bundle ReportBundle size has no change ✅ |
Contributor
|
Important 🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪 🔍 LoopOver is reviewing…AI analysis is in progress. This comment will update when the review is complete. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟪 Reviewing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7873 +/- ##
=======================================
Coverage 91.40% 91.40%
=======================================
Files 730 730
Lines 74763 74763
Branches 22815 22815
=======================================
Hits 68335 68335
Misses 5385 5385
Partials 1043 1043
Flags with carried forward coverage won't be shown. Click here to find out more. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
npm run test:cicomposite script built@loopover/mcpand@loopover/miner(build:mcp/build:miner) aftertest:coverage, butpackages/loopover-mcpandpackages/loopover-minership.tssource only — their compiledbin/*.js/lib/*.jsare gitignored. Everymcp-cli-*/miner-*test that spawns the compiled CLI viaStdioClientTransportwith a hardcodedbin/loopover-mcp.js/bin/loopover-miner.jspath needs those binaries to already exist on disk, so a fresh checkout's localtest:cifailedtest:coveragewithMcpError: MCP error -32000: Connection closed(root cause:MODULE_NOT_FOUNDon the missing compiled bin).validate-testsjob (.github/workflows/ci.yml) already builds engine → MCP → miner before its "Test with coverage" step, so CI itself was never affected — only the localtest:ciscript's ordering diverged from it.npm run build:mcp && npm run build:minernext to the already-correctly-ordered@loopover/engine/@loopover/discovery-indexbuilds, ahead oftypecheck/test:coverage, matching CI's order.test:mcp-pack/test:miner-packkeep their existing position in the script — they still run after their respective builds (which now happen much earlier), so that invariant holds.Scope
type(scope): short summaryConventional Commit format.package.json'stest:ciscript, no source changes.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally — full unsharded run: 1048 test files passed, 2 skipped, 19889 tests passed, 0 failures.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderate— 0 vulnerabilitiespackage.jsonscript (nosrc/**lines, no new branches). Verified instead by reproducing the failure from a clean state — deleted the gitignoredpackages/loopover-mcp/{bin,lib}/*.js,.tsbuildinfo, andpackages/loopover-miner/bin/*.js, confirmedtest/unit/mcp-discovery.test.tsfails with theConnection closed/MODULE_NOT_FOUNDerror on the old ordering, then confirmed it passes with the corrected order — plus a full greennpm run test:ciend to end.If any required check was skipped, explain why:
package.jsonis not undersrc/**, so this diff has no Codecov-measured lines/branches — patch coverage is not a meaningful gate for this change.Safety
Notes