This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
docs(types): date the rotted tsconfig.test.json invariant and name the carve-out it stopped covering - #9750
Merged
Conversation
…the carve-out it stopped covering `packages/types/tsconfig.test.json` closed with an invariant in the imperative: > Every test file in this package is compiled; keep it that way. It is false today, and it is false in the file that states it. ## ROTTED, not born false — the falsifier is one commit Orphans = files under `packages/types/src/__tests__/` matching neither `src/**/*.test.ts` nor `src/**/*.test.tsx`. Re-derived here per ref with `git ls-tree`, each zero carried by a lit control on the same instrument and the same corpus (the files that DO match): | ref | date | what it is | orphans | [LIT CTRL] in the program | |---|---|---|---|---| | `c35fed098` | 2026-08-07 | the sentence's write-time ref (PR #3574) | 0 | 28 | | `dd5b01b59` | 2026-09-02 | `DIST_PIN_GLOB` / the `dist` project lands (PR #7291) | 0 | 85 | | `8195905bf` | 2026-09-09 | the commit before the falsifier | 0 | 152 | | `1ccfc235e` | 2026-09-09 | the falsifier — PR #8646 adds the file | 1 | 153 | | `1cfdff814` | today | `origin/main` | 1 | 204 | The `include` line at the write-time ref is byte-for-byte the one in force today, so the sentence did not drift by its own config moving — the population moved under it. Independently of which commit wrote the sentence: tree-wide, zero `.dist.spec.tsx` files existed at `c35fed098` (lit control: 3716 tracked files), so the construction that falsifies it did not yet exist. TRUE when written, falsified on 2026-09-09. ⇒ kept and dated rather than overwritten (#9713). Overwriting it would erase that it was ever true. ## The exclusion is a construction, not a hole The `.dist.spec.tsx` suffix keeps the built-artifact pins out of this program deliberately: turbo's `type-check` waits on `^build` (the DEPENDENCIES' builds) and must never be handed a program that reads this package's own `dist` — #4801 removed a self-referencing `paths` entry for that reason. The pins are still RUN, by the opt-in `dist` vitest project (`DIST_PIN_GLOB`, #7183). A declared exclusion and a hole look identical in a directory listing, and the false sentence pointed at the wrong one, so the amended invariant now states the carve-out, its reason and its runner. No count is written into the prose (AGENTS.md #9): the comment points at `pnpm type-check:coverage`, which re-derives the claim and shares the same `*.test.ts(x)` definition. `vitest.config.mts` is cited by the `DIST_PIN_GLOB` symbol, never by line (AGENTS.md #11). ## Nothing a program reads changed — measured `tsc -p <cfg> --noEmit --listFiles` for all three of this package's `type-check` legs (`tsconfig.json`, `tsconfig.examples.json`, `tsconfig.test.json`) is byte-identical before and after; `diff` exits 0 on each. No `include`, no `exclude`, no compiler option, no test file moved. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UanLVj6xvbS6puBCewLr8L
tsconfig.test.json invariant and name the carve-out it stopped covering
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
os-sales
marked this pull request as ready for review
September 18, 2026 01:26
os-sales
deleted the
claude/issue-9737-tsconfig-test-invariant-rotted
branch
September 18, 2026 01:46
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #9737
Clause-②: no
packages/types/tsconfig.test.jsonclosed with an invariant in the imperative — "Every test file in this package is compiled; keep it that way." — which is false today, and false in the file that states it. This amends that one comment, and nothing else.The verdict was measured, not inherited — ROTTED, not born false
Orphans = files under
packages/types/src/__tests__/matching neithersrc/**/*.test.tsnorsrc/**/*.test.tsx. Re-derived per ref withgit ls-treein this branch's worktree, never from a working tree. Every zero carries a lit control on the same instrument and the same corpus — the files that DO match — so a zero is a reading, not a dead probe.c35fed098dd5b01b59DIST_PIN_GLOB/ thedistproject lands (PR #7291)8195905bf1ccfc235e1cfdff814origin/mainat branch pointThe orphan is
packages/types/src/__tests__/zod-subpath-single-module-8598.dist.spec.tsx.Two independent legs establish ROTTED rather than BORN FALSE:
includeline at the write-time ref is byte-for-byte the one in force today (diffof the two lines exits 0) ⇒ the sentence did not drift by its own config moving; the population moved under it.c35fed098, the count of.dist.spec.tsxfiles is 0 (lit control: 3716 tracked files at that ref) ⇒ the construction that falsifies the sentence did not yet exist anywhere in the repo when it was written. This leg holds whichever commit is taken to be the write-time ref, so the verdict does not rest ongit log -Sin a shallow checkout.git log -S'Every test file in this package is compiled'over that path returnsc35fed098and nothing else in the fetched window.⇒ TRUE when written, true for thirty-three days, falsified on 2026-09-09 by a single identified commit. So the sentence is kept and dated, not overwritten — overwriting it would erase that it was ever true (#9713).
What the repair says now
The exclusion the sentence stopped covering is a construction with a stated reason and a cited card, not a hole — and a declared exclusion and a hole look identical in a directory listing. The amended invariant therefore states all three things a reader would otherwise have to re-derive:
.dist.spec.tsxbuilt-artifact pins are outside this program;type-checkwaits on^build(the DEPENDENCIES' builds) and must never be handed a program that reads this package's owndist; finding: 包内测试/源码用自身包名 self-import 会在 CI 冷缓存下 TS2307,本地绿掩盖 —— 评估机制化禁令(lint/check),phantom-deps 现存 5 处 self-reference 未核 #4801 removed a self-referencingpathsentry for exactly that reason;distvitest project (DIST_PIN_GLOB, env-gated, reached throughpnpm test:dist), built on purpose by finding(ci): a claim about a package's BUILT artifact cannot be pinned — turbo'stesttask builds dependencies only, so adist-importing test is NOT MEASURED in CI #7183.Two repo rules shaped the wording:
pnpm type-check:coverage(scripts/check-type-check-coverage.mjs), which re-derives the claim and happens to share the same*.test.ts(x)definition, so the two agree by construction rather than by coincidence.vitest.config.mtsis cited by theDIST_PIN_GLOBsymbol, never by a cross-file line address.pnpm check:new-line-citationsprints0 new citation(s)for this branch.⛔ What did NOT change — measured, not asserted
No
include, noexclude, no compiler option, no test file moved. Proven at the level of program inputs rather than of the diff:tsc -p CONFIG --noEmit --listFiles, run for all three legs of this package'stype-checkscript, before and after the edit:--listFilesdiff, before vs aftertsconfig.jsondiffexit 0 — byte-identicaltsconfig.examples.jsondiffexit 0 — byte-identicaltsconfig.test.jsondiffexit 0 — byte-identicalOn that same
--listFilesoutput fortsconfig.test.json: the orphan pin appears 0 times, and the lit controlsrc/__tests__/base-bind-declared.test.tsappears 1 time — the carve-out read directly off the real program, not off the globs.Gates
Exit codes captured to disk before any pipe.
pnpm --filter @object-ui/types type-check(all three legs)tsc --noEmit && tsc -p tsconfig.examples.json && tsc -p tsconfig.test.jsonpnpm exec vitest run packages/types/(repo root)Test Files 204 passed (204)·Tests 4771 passed (4771)pnpm type-check:coveragetest type-check coverage: 43/43 packages compile their tests, 0 declared debtnode scripts/check-changeset-presence.mjsNo source or published contract of a released package changed in this rangepnpm check:new-line-citations0 new citation(s), enforcement report-onlypnpm check:control-bytesOK (scanned 7840 tracked text file(s))pnpm check:published-tsconfig-excludepnpm check:self-importpnpm check:changeset-claimspnpm check:pending-changeset-literalspnpm check:comment-mask-corpuspnpm census:tsconfig-test-paritynode scripts/check-governed-queue-guard.mjs --test(both changed paths)NOT GOVERNED — 2 path(s) checked against 5 governed surface(s); [LIT CTRL]AGENTS.md⇒ exit 3,GOVERNEDAll figures above were taken at
837cea2f9, this branch's final commit.Repo-wide
pnpm lintis CI's run; the local narrowing is declared and proven. eslint's own flat config declares its universe as**/*.{ts,tsx}(plus**/*.tsx) and nothing else; run over the two changed paths with--no-inline-config --format jsonit reports 2 files, 0 errors, and for each one its own message "File ignored because no matching configuration was supplied." No.ts/.tsxfile changed at all, and no tsconfig program input moved (table above), so no untouched file's verdict can move either.The changeset grade is MEASURED
packages/types'files[]is["dist", "README.md", "CHANGELOG.md", "LICENSE"], so anything reachingdistpublishes. Afterpnpm --filter @object-ui/types build, scanning all 130 emitteddistfiles:DATED READING(bytes this PR adds)Every test file in this package is compiled(bytes this PR keeps and quotes)DIST_PIN_GLOB(bytes this PR adds)registry key)field-types.d.ts,zod/node-derivation.d.ts, …The lit control proves the instrument is connected on the same corpus, and the absent control proves it is not matching everything. ⇒ nothing published moved, and the changeset declares that with empty frontmatter — which is the claim, made explicitly rather than by analogy to a
base.tscomment (whose prose does ship intodist/base.d.ts, and would have been gradedpatch).A count is invariant under quotation — probed separately, both reported
The repair quotes the old sentence, so quoted position and assertion position were probed apart with a whitespace-tolerant whole-content scan (
git grepis line-anchored and this is wrapped JSON-with-comments):packages/types/tsconfig.test.json)DATED READING, known present and unquotedThe changeset body carries one further occurrence, also in quoted position. ⇒ no live, undated assertion of the sentence survives anywhere in the tree.
Acceptance notes
.dist.spec.tsxpin and atsconfig.test.jsonmay carry the same sentence-vs-population question". Tree-wide there are exactly 2.dist.spec.tsxfiles (lit control: 7925 tracked files), inpackages/typesandpackages/components, and both packages do have atsconfig.test.json. But the whole-content scan for the invariant sentence returns 1 hit, inpackages/typesonly:packages/components/tsconfig.test.jsonstates no such invariant. ⇒ there is no second site to repair. Noted, not filed; handed back to the dispatching seat.includeon the strength of this sentence ⇒ p1) reads negative in the fetched window: the only two commits touchingpackages/types/tsconfig.test.jsonarec35fed098and4e96becf5, and the latter movedlibonly.Generated by Claude Code