Tripped over while implementing #3476 (PR #3513). Filed unassigned; not fixed there because turbo.json was outside that task's file fence.
The gap
apps/console's type-check script compiles a program that deliberately spans the repo root:
turbo.json's type-check task hashes:
"inputs": ["$TURBO_DEFAULT$", "$TURBO_ROOT$/scripts/vite-*.ts"]
$TURBO_DEFAULT$ only covers files inside the package directory, and globalDependencies is unset. That second entry exists precisely to close this hole for the scripts/vite-*.ts half — nothing covers vitest.config.mts.
Measured
On PR #3513's branch: run type-check green so it caches, then plant a real type error in the root vitest.config.mts and re-run only the console filter.
$ npx turbo run type-check --filter @object-ui/console --concurrency=2
@object-ui/console:type-check: cache hit, replaying logs 4214aa6ab3df0f18
Tasks: 35 successful, 35 total
Time: 315ms FULL TURBO
Turbo replayed a green while the program contained:
../../vitest.config.mts(114,5): error TS2769: No overload matches this call.
Type 'string' is not assignable to type 'number'.
A cold run on the same tree exits 1. So the verdict depends on cache state, not on the code.
Not local-only: .github/workflows/ci.yml persists .turbo/cache via actions/cache, so a warm CI cache can carry the stale green across runs.
Suggested fix
Symmetric with the entry already there — one line:
- "inputs": ["$TURBO_DEFAULT$", "$TURBO_ROOT$/scripts/vite-*.ts"]
+ "inputs": ["$TURBO_DEFAULT$", "$TURBO_ROOT$/scripts/vite-*.ts", "$TURBO_ROOT$/vitest.config.mts"]
Worth considering alongside it: this list is a thing to keep honest by hand, and it has now been wrong twice for the same structural reason (a package's tsc program reaching outside its own directory). Whether that deserves a guard — something that derives the extra inputs from the tsconfig include, or pins the pair — is a maintainer call, not part of the one-liner.
Ordering
Only bites once PR #3513 merges (before that, vitest.config.mts is in no gated program at all). The scripts/vite-*.ts half is already handled, so there is nothing broken on main today.
Blocked-by: #3513
Generated by Claude Code
Tripped over while implementing #3476 (PR #3513). Filed unassigned; not fixed there because
turbo.jsonwas outside that task's file fence.The gap
apps/console'stype-checkscript compiles a program that deliberately spans the repo root:../../scripts/vite-crypto-stub.ts,../../scripts/vite-maplibre-worker.ts(already there)../../vitest.config.mts(added by PR ci(console): 把 vitest.config.ts 纳入 tsc program,并把根 vitest 配置算进 turbo 的 cache key #3513, becauseapps/console/vitest.config.tsimports it and a composite project must list every file in its program)turbo.json'stype-checktask hashes:$TURBO_DEFAULT$only covers files inside the package directory, andglobalDependenciesis unset. That second entry exists precisely to close this hole for thescripts/vite-*.tshalf — nothing coversvitest.config.mts.Measured
On PR #3513's branch: run
type-checkgreen so it caches, then plant a real type error in the rootvitest.config.mtsand re-run only the console filter.Turbo replayed a green while the program contained:
A cold run on the same tree exits 1. So the verdict depends on cache state, not on the code.
Not local-only:
.github/workflows/ci.ymlpersists.turbo/cacheviaactions/cache, so a warm CI cache can carry the stale green across runs.Suggested fix
Symmetric with the entry already there — one line:
Worth considering alongside it: this list is a thing to keep honest by hand, and it has now been wrong twice for the same structural reason (a package's tsc program reaching outside its own directory). Whether that deserves a guard — something that derives the extra
inputsfrom the tsconfiginclude, or pins the pair — is a maintainer call, not part of the one-liner.Ordering
Only bites once PR #3513 merges (before that,
vitest.config.mtsis in no gated program at all). Thescripts/vite-*.tshalf is already handled, so there is nothing broken onmaintoday.Blocked-by: #3513
Generated by Claude Code