…the carve-out it stopped covering (objectstack-ai#9750)
Fixes objectstack-ai#9737
Clause-②: no
`packages/types/tsconfig.test.json` closed 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
**neither** `src/**/*.test.ts` nor `src/**/*.test.tsx`. Re-derived per
ref with `git ls-tree` in 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.
| ref | date | what it is | orphans | **[LIT CTRL]** files in the
program |
|---|---|---|---|---|
| `c35fed098` | 2026-08-07 | the sentence's write-time ref (PR objectstack-ai#3574) |
**0** | 28 |
| `dd5b01b59` | 2026-09-02 | `DIST_PIN_GLOB` / the `dist` project lands
(PR objectstack-ai#7291) | **0** | 85 |
| `8195905bf` | 2026-09-09 | the commit immediately before the falsifier
| **0** | 152 |
| `1ccfc235e` | 2026-09-09 | **the falsifier** — PR objectstack-ai#8646 adds the file
| **1** | 153 |
| `1cfdff814` | today | `origin/main` at branch point | **1** | 204 |
The orphan is
`packages/types/src/__tests__/zod-subpath-single-module-8598.dist.spec.tsx`.
Two independent legs establish ROTTED rather than BORN FALSE:
1. The `include` line at the write-time ref is **byte-for-byte** the one
in force today (`diff` of the two lines exits 0) ⇒ the sentence did not
drift by its own config moving; the population moved under it.
2. Tree-wide at `c35fed098`, the count of `.dist.spec.tsx` files 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 on `git log -S` in a
shallow checkout.
`git log -S'Every test file in this package is compiled'` over that path
returns `c35fed098` and 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
(objectstack-ai#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:
- **the carve-out** — the `.dist.spec.tsx` built-artifact pins are
outside this program;
- **its reason** — turbo's `type-check` waits on `^build` (the
DEPENDENCIES' builds) and must never be handed a program that reads this
package's own `dist`; objectstack-ai#4801 removed a self-referencing `paths` entry for
exactly that reason;
- **its runner** — the pins are still RUN, by the opt-in `dist` vitest
project (`DIST_PIN_GLOB`, env-gated, reached through `pnpm test:dist`),
built on purpose by objectstack-ai#7183.
Two repo rules shaped the wording:
- **AGENTS.md objectstack-ai#9** — no count is written into the prose. The comment
points at `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.
- **AGENTS.md objectstack-ai#11** — `vitest.config.mts` is cited by the
`DIST_PIN_GLOB` **symbol**, never by a cross-file line address. `pnpm
check:new-line-citations` prints `0 new citation(s)` for this branch.
## ⛔ What did NOT change — measured, not asserted
No `include`, no `exclude`, 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's `type-check` script, **before and after** the edit:
| program | exit | `--listFiles` diff, before vs after |
|---|---|---|
| `tsconfig.json` | 0 | `diff` exit **0** — byte-identical |
| `tsconfig.examples.json` | 0 | `diff` exit **0** — byte-identical |
| `tsconfig.test.json` | 0 | `diff` exit **0** — byte-identical |
On that same `--listFiles` output for `tsconfig.test.json`: the orphan
pin appears **0** times, and the lit control
`src/__tests__/base-bind-declared.test.ts` appears **1** time — the
carve-out read directly off the real program, not off the globs.
## Gates
Exit codes captured to disk before any pipe.
| gate | exit | verdict line |
|---|---|---|
| `pnpm --filter @object-ui/types type-check` (all three legs) | **0** |
`tsc --noEmit && tsc -p tsconfig.examples.json && tsc -p
tsconfig.test.json` |
| `pnpm exec vitest run packages/types/` (repo root) | **0** | `Test
Files 204 passed (204)` · `Tests 4771 passed (4771)` |
| `pnpm type-check:coverage` | **0** | `test type-check coverage: 43/43
packages compile their tests, 0 declared debt` |
| `node scripts/check-changeset-presence.mjs` | **0** | `No source or
published contract of a released package changed in this range` |
| `pnpm check:new-line-citations` | **0** | `0 new citation(s),
enforcement report-only` |
| `pnpm check:control-bytes` | **0** | `OK (scanned 7840 tracked text
file(s))` |
| `pnpm check:published-tsconfig-exclude` | **0** | |
| `pnpm check:self-import` | **0** | |
| `pnpm check:changeset-claims` | **0** | |
| `pnpm check:pending-changeset-literals` | **0** | |
| `pnpm check:comment-mask-corpus` | **0** | |
| `pnpm census:tsconfig-test-parity` | **0** | |
| `node scripts/check-governed-queue-guard.mjs --test` (both changed
paths) | **0** | `NOT GOVERNED — 2 path(s) checked against 5 governed
surface(s)`; **[LIT CTRL]** `AGENTS.md` ⇒ exit 3, `GOVERNED` |
All figures above were taken at `837cea2f9`, this branch's final commit.
**Repo-wide `pnpm lint` is 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 json` it reports **2**
files, **0** errors, and for each one its own message *"File ignored
because no matching configuration was supplied."* No `.ts`/`.tsx` file
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 reaching `dist` publishes. After `pnpm --filter
@object-ui/types build`, scanning all **130** emitted `dist` files:
| probe | hits |
|---|---|
| `DATED READING` (bytes this PR adds) | **0** |
| `Every test file in this package is compiled` (bytes this PR keeps and
quotes) | **0** |
| `DIST_PIN_GLOB` (bytes this PR adds) | **0** |
| **[LIT CTRL]** source-comment prose known to ship (`registry key`) |
**5** — `field-types.d.ts`, `zod/node-derivation.d.ts`, … |
| **[ABSENT CTRL]** a nonsense token | **0** |
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.ts` comment (whose prose *does* ship into
`dist/base.d.ts`, and would have been graded `patch`).
## 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 grep` is line-anchored and this is wrapped JSON-with-comments):
| position | occurrences |
|---|---|
| total, any position | **1** (`packages/types/tsconfig.test.json`) |
| quoted position (opens with a double quote) | **1** |
| **assertion position** (total − quoted) | **0** |
| **[LIT CTRL]** `DATED READING`, known present and unquoted | **1** |
| **[ABSENT CTRL]** a nonsense token | **0** |
The changeset body carries one further occurrence, also in quoted
position. ⇒ no live, undated assertion of the sentence survives anywhere
in the tree.
## Acceptance notes
- **Measured in passing, and it dissolves rather than opens the second
card.** The dispatch fenced out "every package with a `.dist.spec.tsx`
pin and a `tsconfig.test.json` may carry the same sentence-vs-population
question". Tree-wide there are exactly **2** `.dist.spec.tsx` files (lit
control: 7925 tracked files), in `packages/types` and
`packages/components`, and both packages do have a `tsconfig.test.json`.
But the whole-content scan for the invariant sentence returns **1** hit,
in `packages/types` only: `packages/components/tsconfig.test.json`
states no such invariant. ⇒ there is no second site to repair. Noted,
not filed; handed back to the dispatching seat.
- The triage seat's optional escalation probe (has anyone already
widened an `include` on the strength of this sentence ⇒ p1) reads
**negative** in the fetched window: the only two commits touching
`packages/types/tsconfig.test.json` are `c35fed098` and `4e96becf5`, and
the latter moved `lib` only. ⚠️ The checkout is shallow, so this is a
NOT-FULLY-MEASURED negative rather than a proven absence.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01UanLVj6xvbS6puBCewLr8L)_
Co-authored-by: Claude <noreply@anthropic.com>
Fixes #8598.
Manifest half landed under decision batch #103 (option A). The contract review then returned FAIL on
8b8cbfdfor one real defect this PR introduced, plus two owed items; all three are addressed ond7a81dbbe6ca5bc33a4c92251928cbbdc452220f.Test (shard 2/4)was red on8b8cbfdon a diff that touched no test at all.packages/cli/src/__tests__/cli-bin.test.tsself-builds@object-ui/typeswhen the zod bundle is absent — CI's test job has no build step, by design — and it spawnedpnpm --filter @object-ui/types run buildwith the vitest worker's entire environment. Vitest setsVITEST=true, children inherit it, all 24packages/*vite configs open withif (process.env.VITEST) { assertCanonicalVitestInvocation(...) }, and that guard derives its vitest root fromcwd— whichpnpm --filtersets to the package directory. So the guard read a build as a vitest run launched from the wrong place and calledprocess.exit(1)before the bundler started.⭐ The build script, the spawning test and the guard are each correct in isolation. This PR created the intersection: it made
@object-ui/typesthe first vite-built package that a test builds from inside vitest. The cli's own self-build survives only because it builds withtsup. On8e028c2the build script never loaded the config, so nothing could have surfaced it earlier.Fix home chosen: the spawn, not the config
VITESTfrom the spawned build's env (BUILD_ENVincli-bin.test.ts, applied to both build spawns in that file — the only two in the repo)command: 'build'instead of the variableThree reasons, in order of force:
VITESTmeans "vitest is loading this config". In a build the test starts, that is untrue. The spawn is the only place that knows its child is a build rather than a test run.scripts/__tests__/vitest-invocation-guard.test.tsrequires the literalif (process.env.VITEST) {+assertCanonicalVitestInvocation(shape in everypackages/*vite config. Gating oncommandwould red that ratchet and diverge 1 of 24 byte-identical blocks.vite buildis never refused". The leak falsifies it from OUTSIDE, where no config can see it.What the rejected fix would still leave open: it immunises one config and leaves the other 23 exactly as exposed — the next test that spawns a build of
@object-ui/fields,plugin-gridor any of the rest breaks the same way. The chosen fix is caller-side, so it holds no matter which package a future spawn targets.Item 4 — the class, not just the symptom
The review recorded this class LOW last round and it became the HIGH defect this round. Closed two ways:
scripts/__tests__/spawned-build-vitest-env-8598.test.ts(new) derives every build spawn in the test tree by AST, resolves anenv:identifier to its declaration in the same file, and requiresVITESTto be scrubbed. Population floor plus a named member, so an empty walk goes red rather than green.zod-subpath-bundle-config-8598.test.ts's header now says that importing the config executes that same guard, why it passes there (canonical root invocation) and where the harmful face of the class was repaired.env:property text, and the fix is naturally written as a named constant (env: BUILD_ENV), which contains noVITESTtoken. Resolving the identifier to its declaration is what makes it a measurement. A gate that reports a fixed tree as broken is one edit away from a gate that reports a broken tree as fixed.Both legs of the re-measurement
Leg (c) is the review's prescribed shape: from the repo root, with
packages/types/dist/zod/index.zod.jsabsent,pnpm exec vitest run packages/cli/src/__tests__/cli-bin.test.ts.8b8cbfd)d7a81db)Failed to build @object-ui/types for tests, 1 file failedVITEST=true pnpm --filter @object-ui/types run buildvitest root: …/packages/typesvs 仓库根…/objectui-issue-8598)env -u VITEST✓ built in 157ms, 124 files verified⭐ Leg (a) staying red is the point: the guard is untouched and still refuses a
VITEST-marked build. What changed is that no test lies to it any more. And on leg (c) after the fix, the test's ownbeforeAllrebuilt the artifact and it is the bundle — 0 relative specifiers — so the CLI suite now exercises the new published face.Ratchet reverse-verification, hash-proven and trap-restored: fixed file
sha256 9f633e13…with 2 scrubs → mutated to70e38e39…with 1 → the ratchet goes red namingcli-bin.test.ts:103→ restored to9f633e13…, 2 scrubs.Item 5 — the changeset now carries the deep-link sentence
It was byte-unchanged in the previous increment; the statement lived only here. Added to
.changeset/8598-zod-subpath-single-bundled-module.md, and re-measured rather than inherited: a raw-path sibling keeps the pre-#8344 accept set (nested off-spec ACCEPTED), the path is not reachable through the package name (ERR_PACKAGE_PATH_NOT_EXPORTED), and mixing a raw-path import with the bundled entry yields two distinct schema instances (Bundled === RawPath→false).⭐ Item 6 —
check:published-distis measured locally or nowhereThe ruling said CI would run it on the moved head. It cannot.
published-dist-gate.ymlfires only onworkflow_dispatch, cron41 3 * * *, andpush: main, and its own header says why: "the gate has to build all 39 published packages. This repository deliberately has no per-PR full-repo build."⇒ The reading below is the only one this change will ever get. ⛔ It is not deferred to CI:
Build Docs(#8647) andcheck:node-esm-load.What ships
packages/types/package.json"build": "tsc && vite build && node ../../scripts/check-dist-completeness.mjs"+"vite": "^8.2.1"pnpm-lock.yamlviteentry for this importer, nothing elsepackages/types/vite.config.ts./zodas ONE module, overwritingdist/zod/index.zod.jsin placepackages/types/src/__tests__/zod-subpath-bundle-config-8598.test.tsunitpin on the config, chieflyemptyOutDir: falsepackages/types/src/__tests__/zod-subpath-single-module-8598.dist.spec.tsxpackages/types/src/__tests__/package-exports-manifest.test.tspackages/cli/src/__tests__/cli-bin.test.tsscripts/__tests__/spawned-build-vitest-env-8598.test.ts.changeset/8598-zod-subpath-single-bundled-module.mdThe defect this card closes, in one paragraph
@object-ui/typesdeclares"sideEffects": false.src/zod/index.zod.tsfills the #8344 node recursion point as the initializer of itsAnyComponentSchemaconst, andtscemitted that barrel as a module whose only other content is re-exports — so a bundler resolvingimport { CardSchema } from '@object-ui/types/zod'followed the re-export todist/zod/layout.zod.js, needed nothing from the barrel's body, and the flag let it drop that body whole, fill included. Bundling removes the boundary the drop needs.The H-check — three bundlers, each with a control
Taken on
8b8cbfd; the increment since touches nopackages/typessource or build input, so the artifact is unchanged (sha256 e06b8a5b…). Entry in every row: onlyCardSchema;zodand@objectstack/specexternal. Left column is the ablation.tscbarrel (ablated)./zodRollup is measured beside Vite because Vite 8 bundles with rolldown, not rollup. Well-formed control (
size: 16) ACCEPTED in all six cells. Ablation hash-proven (e06b8a5b…/ 0 relative specifiers / 331,934 B →4b46cbda…/ 29 / 15,943 B) and restored byte-identical under anEXIT INT TERMtrap.Build Docsis a no-regression reading, not an accept-set one — it is green on the ablated artifact too, and per #8647 the CI check skips the build entirely on apackages/**-only diff. The Turbopack accept-set reading is the third row, from a standalone Next 16.3.1 app whose only import isCardSchema.Lockfile — the ruling's two conditions, both MET
Mechanism: the importer block was written to the resolution already locked for 28 of the 29 existing
viteimporters, then verified withpnpm install --frozen-lockfile(exit 0, lockfile not rewritten, same store path as the other 28). A naive install lands8.2.2and dragspicomatch;resolution-mode=lowest-directgets the version right but rewrites 17/176 lines. Both measured, both rejected.origin/main29 importers, this head 30, base set{8.2.1}on both.packages/typesis the only addition; no existing resolution moved.The pre-existing peer-suffix split (
esbuild@0.28.2×29,esbuild@0.27.7×1) and the 17 transitivevite@8.2.2peer keys are byte-equal on both trees.Gates on
d7a81db, exit captured before any pipepnpm --filter @object-ui/types type-checktscprojectspnpm --filter @object-ui/cli type-checkvitest run --project unit packages/types/ scripts/__tests__/Test Files 278 passed | 2 skipped (280) · Tests 6568 passedpnpm test:distTest Files 2 passed (2) · Tests 8 passed (8)pnpm exec eslinton the three edited/new filespnpm check:control-bytesscanned 6840 tracked text file(s)Carried from
8b8cbfd, unaffected by an increment that touches only tests and the changeset:pnpm check(All checks passed, CI runs it atlint.yml:481),check:published-dist(see item 6),check:node-esm-load --force-build(0, provenance 37/37 — its plain run exits 1 on a foreign shared-turbo-cache entry naming a package outside this diff, and the gate prints that remedy itself),check:dist-completeness,check:phantom-deps,check:unused-deps,check:side-effects-array,check:readme-exports,check:self-import,check:published-tsconfig-exclude,check:unreferenced-sources,check:esm-specifiers,check-governed-queue-guard --test(NOT GOVERNED).Recorded, not fixed here
@object-ui/types/zodtosrc, so they always evaluate the barrel and are unaffected. The console is a class-(ii) consumer (plugin-map/ObjectMap.tsxonly).sideEffectschange, noci.ymlchange, nothing underpackages/types/src/zod/**. check-side-effects-array cannot see a load-time effect written inside aconstinitializer, and scores @object-ui/types zero #8578 and ChatbotSchema.body accepts more than the declared contract #8572 untouched.scripts/vitest-invocation-guard.mjsships no typings; that is why the config import here is behind a variable specifier rather than a literal one.Generated by Claude Code — session
session_01Jmxdo7bmeqCQHLSfmLVX9w(https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w). Kept in prose because a PR-body edit strips the markdown attribution footer.