You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(type-check): site is not debt — its own next build type-checks it (#2924)
The #2911 sweep recorded `@object-ui/site` as 7 errors of debt. Measured: it is
zero. The 7 TS2304 on `LayoutProps`/`PageProps`/`RouteContext` were entirely an
artifact of never having built it — `apps/site/tsconfig.json` includes
`.next/types/**/*.ts`, and those types only exist after `next build`. Run the
build first and `tsc --noEmit` is exit 0.
So site was never broken; it was miscategorised, and its phantom 7 inflated the
outstanding-error count by 28% (32 -> 25).
It also does not need a `type-check` script: `next build` runs a full type-check
unless `typescript.ignoreBuildErrors` is set, and the `docs` CI job runs that
build. Adding a script would just run the compiler twice — and would pull a Next
build into the Type Check job.
New `CHECKED_BY_OWN_BUILD` category records that, and — because
`ignoreBuildErrors` is precisely how such an exemption would silently rot into
the #2911 hole — verifies it rather than trusting it. Three failure modes, all
proven red before being trusted:
- `ignoreBuildErrors: true` added to next.config.mjs -> exit 1
- site gains a `type-check` script (stale entry) -> exit 1
- build script changes out from under the exemption -> exit 1
Recorded caveat, since it is a real cost/coverage call rather than an oversight:
the `docs` job runs the site build only when `apps/site/` or `content/` changed
(plus every push to main), so a PR touching only a package in
`transpilePackages` does not re-check the site until it lands.
No changeset: scripts-only, no published package changes.
Refs #2911, #2915, #2919
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
"@object-ui/site": {errors: 7,issue: 2919,note: "TS2304 on Next's generated LayoutProps/PageProps; needs .next/types from a prior next build"},
34
33
"@object-ui/plugin-grid": {errors: 4,issue: 2919,note: "2x t() call signature + 2x TS2367 that are closure-mutation narrowing artifacts, NOT a logic bug"},
35
34
"@object-ui/cli": {errors: 4,issue: 2919,note: "tsup dts:true does not fail on these"},
36
35
"@object-ui/plugin-view": {errors: 3,issue: 2916,note: "Record<ViewType,...> missing the 'chart' key"},
@@ -45,6 +44,25 @@ const DEBT = {
45
44
// package, the exemption dies, and the guard fails.
0 commit comments