From 78a14cbddf0151e43ab0b64429854b7fa73e8df7 Mon Sep 17 00:00:00 2001 From: JSONbored <49853598+JSONbored@users.noreply.github.com> Date: Thu, 30 Jul 2026 12:24:26 -0700 Subject: [PATCH] fix(ci): build @loopover/contract before packing the MCP and miner packages Both publish workflows have failed on EVERY main commit for as long as the run history goes back -- three retries per push, never one success -- so neither package has actually been publishing. packages/loopover-contract/dist is gitignored. Both workflows already build @loopover/engine for exactly that reason, with a comment explaining it, but neither builds the contract -- and both packages import it: bin/loopover-mcp.ts(16,8): TS2307: Cannot find module "@loopover/contract/api-schemas" bin/loopover-miner-mcp.ts(5,44): TS2307: Cannot find module "@loopover/contract" Reproduced locally by deleting the contract dist/ and running each workflow's own build command: 9 unresolved imports for MCP, 7 for the miner. With the new step both pass. Scope is exactly these two: publish-contract already builds itself, and publish-engine / publish-mcp-registry / publish-ui-kit do not depend on the contract at all. The failure hides in a publish workflow rather than validate-*, so PR CI stays green and the gate is unaffected -- which is why "red on main" read as release noise instead of "this package has not shipped since it started importing the contract". Closes #9946 --- .github/workflows/publish-mcp.yml | 9 +++++++++ .github/workflows/publish-miner.yml | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/workflows/publish-mcp.yml b/.github/workflows/publish-mcp.yml index fd580da1d9..c6fddc5e2a 100644 --- a/.github/workflows/publish-mcp.yml +++ b/.github/workflows/publish-mcp.yml @@ -130,6 +130,15 @@ jobs: # specifically (imports packages/loopover-mcp and spawns the built binary), NOT the sibling # test/unit/mcp-*.test.ts files that exercise the Worker's separate remote MCP server # (src/mcp/server.ts, a different deployable entirely). + # packages/loopover-mcp imports @loopover/contract (api-schemas / tools / cli-config / client-config). + # That package's dist/ is gitignored exactly like the engine's above, so without building it here every + # one of those imports fails to resolve -- "Cannot find module '@loopover/contract/...'" -- and the + # build below exits 2. This publish has been red on EVERY main commit for as long as the run history + # goes back, retrying three times per push and never once succeeding, so the package has not actually + # been publishing. Same reason and same placement as the engine build directly above. + - name: Build loopover-contract + run: npm run build --workspace @loopover/contract + - name: MCP package syntax validation run: npm run build:mcp diff --git a/.github/workflows/publish-miner.yml b/.github/workflows/publish-miner.yml index 7fcf9ba036..c03fc95a06 100644 --- a/.github/workflows/publish-miner.yml +++ b/.github/workflows/publish-miner.yml @@ -125,6 +125,15 @@ jobs: # is gitignored, so this is the only place it ever exists), same as ci.yml's own "Build miner CLI" # step, followed by node --check syntax validation over every bin/lib file (the same two-part # script test:ci already runs on every PR). + # packages/loopover-miner imports @loopover/contract (api-schemas / tools / cli-config / client-config). + # That package's dist/ is gitignored exactly like the engine's above, so without building it here every + # one of those imports fails to resolve -- "Cannot find module '@loopover/contract/...'" -- and the + # build below exits 2. This publish has been red on EVERY main commit for as long as the run history + # goes back, retrying three times per push and never once succeeding, so the package has not actually + # been publishing. Same reason and same placement as the engine build directly above. + - name: Build loopover-contract + run: npm run build --workspace @loopover/contract + - name: Miner build + syntax validation run: npm run build --workspace @loopover/miner