chore(type-check): site is not debt — its own next build type-checks it - #2924
Merged
Conversation
…s it 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: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This was referenced Jul 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up off #2915 / #2919. Closes out the
@object-ui/siteentry by measuring it instead of assuming.It was miscategorised — zero errors, not 7
The #2911 sweep recorded
@object-ui/siteas 7 errors of debt:Those are Next's generated types.
apps/site/tsconfig.jsonincludes them explicitly:.next/typesonly exists after a build, and site is excluded frompnpm build(--filter=!@object-ui/site), so the sweep measured a package that had never been built. Build it and:Zero. The phantom 7 were inflating the outstanding-error count by 28% (32 → 25), which matters because that number is meant to be read as a health signal.
And it doesn't need a
type-checkscriptnext buildruns a full type-check unlesstypescript.ignoreBuildErrorsis set — andapps/site/next.config.mjsdoes not set it. ThedocsCI job already runs that build. Adding atype-checkscript would run the compiler twice and pull a Next build into the Type Check job for no new coverage.So the honest classification isn't "debt" or "exempt" — it's checked, by a different mechanism. New
CHECKED_BY_OWN_BUILDcategory records exactly that.The exemption is verified, not trusted
ignoreBuildErrors: trueis a one-line flag that would silently turn this exemption into precisely the hole #2911 was about — a package that looks covered and isn't. So the guard checks it on every run. Three failure modes, each proven red before being trusted:ignoreBuildErrors: trueadded tonext.config.mjstype-checkscript (stale entry)Baseline restores green afterwards, with no residual diff (restored via
cp, notgit checkout).Recorded caveat
Noted in the code, because it's a genuine cost/coverage call rather than an oversight: the
docsjob runs the site build only whenapps/site/orcontent/changed (plus every push to main). A PR that touches only a workspace package listed intranspilePackagestherefore doesn't re-check the site until it lands. Closing that would mean paying a Next build on many more PRs — worth a deliberate decision, so I've left it visible rather than silently widening CI.Verification
node scripts/check-type-check-coverage.mjs— green, and red in all three tamper modes abovenode scripts/check-changeset-fixed.mjs— green🤖 Generated with Claude Code