What
apps/docs/package.json declares two near-identically named type-checking scripts:
"types:check": "fumadocs-mdx && next typegen && tsc --noEmit",
"typecheck": "tsc --noEmit"
types:check — the thorough one — is called by nothing. Measured on
origin/main @ 5886ee6d22:
grep -rn "types:check" .github/ scripts/ -> no matches
No workflow, no script, no turbo task references it. The one that actually runs is
typecheck, reached through the root turbo run typecheck.
Why it may be worth a card
apps/docs/tsconfig.json includes the generated route types:
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx",
".next/types/**/*.ts", ".next/dev/types/**/*.ts"]
Those paths are produced by next typegen — which only types:check runs. So the
program typecheck actually checks depends on whether some earlier, unrelated
command happened to populate .next: a previous next build or next dev in the
same checkout. A clean checkout type-checks a strictly smaller program than a dirty
one, and neither is declared anywhere.
Measured directly while verifying #10782: with apps/docs/.next deleted,
pnpm --filter @objectstack/docs typecheck -> DOCS_TYPECHECK_EXIT=0
It passes without the generated route types existing at all. That is the
"reads green, verified less" shape — the failure is not that it goes red, but that
its coverage is set by incidental build state and nothing says so.
Two things a triage round might separate:
- the dead
types:check script (either wire it up or delete it — ADR-0049's
enforce-or-remove instinct applied to a package script); and - whether the docs app's declared type-check should include
next typegen, so
coverage is a property of the script rather than of leftover .next state.
I have not verified whether the generated route types would actually catch anything
in this app today — that is the triage question, not a claim made here.
Found while working on #10782 (Next middleware -> proxy convention rename);
out of that card's file surface, so filed rather than fixed. Unassigned.
What
apps/docs/package.jsondeclares two near-identically named type-checking scripts:types:check— the thorough one — is called by nothing. Measured onorigin/main@5886ee6d22:No workflow, no script, no turbo task references it. The one that actually runs is
typecheck, reached through the rootturbo run typecheck.Why it may be worth a card
apps/docs/tsconfig.jsonincludes the generated route types:Those paths are produced by
next typegen— which onlytypes:checkruns. So theprogram
typecheckactually checks depends on whether some earlier, unrelatedcommand happened to populate
.next: a previousnext buildornext devin thesame checkout. A clean checkout type-checks a strictly smaller program than a dirty
one, and neither is declared anywhere.
Measured directly while verifying #10782: with
apps/docs/.nextdeleted,It passes without the generated route types existing at all. That is the
"reads green, verified less" shape — the failure is not that it goes red, but that
its coverage is set by incidental build state and nothing says so.
Two things a triage round might separate:
types:checkscript (either wire it up or delete it — ADR-0049'senforce-or-remove instinct applied to a package script); and
next typegen, socoverage is a property of the script rather than of leftover
.nextstate.I have not verified whether the generated route types would actually catch anything
in this app today — that is the triage question, not a claim made here.
Found while working on #10782 (Next
middleware->proxyconvention rename);out of that card's file surface, so filed rather than fixed. Unassigned.