Commit 693a6cb
committed
fix(ci): declare @loopover/contract#build on the three typecheck tasks that transitively need it
validate-code failed on this PR with 'Cannot find module @loopover/contract/tools'
plus five downstream implicit-any errors in src/mcp/server.ts -- none of which this
PR touches.
#9530 added @loopover/contract, and src/mcp/server.ts imports @loopover/contract/tools.
Three turbo typecheck tasks pull that file into their program without any build edge
to the package:
- @loopover/ui#typecheck: apps/loopover-ui/tsconfig.json includes
$TURBO_ROOT$/worker-configuration.d.ts, which imports './src/index' -- so the ENTIRE
Worker is in the UI's typecheck program (src/index.ts -> src/api/routes.ts ->
src/mcp/server.ts -> @loopover/contract/tools). Confirmed with tsc --explainFiles,
not inferred. apps/loopover-ui has no package.json dependency on contract, so ^build
never builds it.
- //#typecheck: a root task, where a root package.json dependency creates no build edge.
- @loopover/ui-miner#typecheck: reaches packages/loopover-miner/lib/**, which imports
the package, and miner-ui has no dependency on it either.
Each already carries an explicit @loopover/engine#build edge for precisely this reason
-- turbo.json's own comment there describes the same scheduling race, observed
intermittently in validate-code, that bit here.
Cache-dependent, which is why it looked like flakiness: turbo caches these tasks, so
the failure only appears on a cache MISS. Other open PRs are green on cache hits.
Verified both directions from a clean contract build state (dist/ and .tsbuildinfo both
removed, --force):
- with the edges: 4 tasks successful, contract built first, typecheck passes
- without them: the identical six errors CI reported1 parent b50d2e3 commit 693a6cb
1 file changed
Lines changed: 18 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
| |||
79 | 84 | | |
80 | 85 | | |
81 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
82 | 94 | | |
83 | | - | |
| 95 | + | |
84 | 96 | | |
85 | 97 | | |
86 | 98 | | |
| |||
122 | 134 | | |
123 | 135 | | |
124 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
125 | 140 | | |
126 | | - | |
| 141 | + | |
127 | 142 | | |
128 | 143 | | |
129 | 144 | | |
| |||
0 commit comments