Skip to content

Commit 5da74a5

Browse files
voidstackloopclaude
andcommitted
fix(ci): release workflow never built @modelforge/contracts before running tests
Same root cause already fixed in ci.yml's test/server/e2e/sbom jobs, just not yet applied here: frontend/ and app/ depend on packages/contracts via file:../packages/contracts, which npm ci only symlinks into their node_modules -- it never builds that package's own dist/ output or installs its own deps. 'Run tests' has no prebuild hook (unlike the 'Build' step further down, which self-heals via app/'s own prebuild), so vitest/vite failed to resolve '@modelforge/contracts' at all -- exactly what broke the actual v1.3.0 release build just now. Reproduced by removing packages/contracts/node_modules and dist/ entirely and confirming the same Vite import-analysis failure; fixed by installing and building it first, then confirmed both 'npm --prefix frontend test' and 'npm --prefix app test' pass in full (101 and 1018 tests respectively). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 41090fd commit 5da74a5

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ jobs:
2424
with:
2525
node-version: 22
2626

27+
# frontend/ and app/ both depend on this via `file:../packages/contracts`
28+
# (see their package.json). `npm ci` in either just symlinks
29+
# packages/contracts itself into their node_modules — it never builds
30+
# *that* package's own dist/ output, and never installs its own
31+
# dependencies (zod, typescript) either, since this repo uses plain
32+
# `file:` references rather than true npm workspaces. Only app/'s own
33+
# `npm run build` below self-heals via a `prebuild` hook; "Run tests"
34+
# has no such hook and fails to resolve `@modelforge/contracts` at all
35+
# without this step (see ci.yml's identical step for the same fix
36+
# applied there first).
37+
- name: Install and build @modelforge/contracts
38+
working-directory: packages/contracts
39+
run: npm ci && npm run build
40+
2741
- name: Install frontend dependencies
2842
working-directory: frontend
2943
run: npm ci

0 commit comments

Comments
 (0)