Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

test(ci): a dist vitest project so built-artifact claims can be pinned - #7291

Merged
yinlianghui merged 3 commits into
mainfrom
claude/issue-7183-dist-vitest-project
Sep 2, 2026
Merged

yinlianghui merged 3 commits into
mainfrom
claude/issue-7183-dist-vitest-project

Conversation

@yinlianghui

@yinlianghui yinlianghui commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #7183

Implements the PM ruling on this card (2026-09-02, option 1): a dedicated dist vitest project with its own turbo task that builds the package under test first.

The gap

The root vitest.config.mts aliases every workspace package to its src. That is right for the ~2000 tests that want fast source feedback, and it makes "does the SHIPPED BUNDLE still do X" structurally unanswerable. Such a test could not be committed either: turbo's test task is dependsOn: ["^build"] — the DEPENDENCIES' builds, never the package's own — so a dist-importing test landed in CI with no dist to import. That is NOT MEASURED rather than a red pin, and the usual repair (delete it, or let it skip when dist is missing) leaves a green suite that measures nothing. Two lanes hit this wall in one morning and each threw a correct measurement away.

The five binding constraints, and where each is met

1. Only built-artifact pins; first resident re-derived from PR #7180; no source-resolved test moves in.
The project collects exactly one glob, packages/*/src/**/*.dist.spec.tsx (spelled in the config, not here — a star-slash pair inside a block comment ends the comment, which this PR learned the hard way, see Corrections below). Its only resident is packages/components/src/__tests__/page-header-action-ids.dist.spec.tsx: an id-authored page:header resolves an action whose definition carries a script body, and the marker reaches neither the rendered DOM nor the authored node. Nothing was moved into the project; no existing test changed.

2. dependsOn: ["build"] for the package under test (self, not ^build), and a loud precondition — not a skip — when dist is absent.
turbo.json gains test:dist with dependsOn: ["build"] and cache: false. The precondition is an explicit assertion that reads the built entry from the package's own package.json exports["."].import and names the absolute path when it is missing. It fails; it does not skip.

3. The live control from PR #7180 is part of the delivery.
registers page:header from the BUILT bundle is a bare toBeTruthy() on purpose — a custom message would change the string the control is recorded by. See verdict (iii).

4. Wired where the existing test job runs; no timeout raised, no heavy-test allowlist entry.
One step in the existing test job of .github/workflows/ci.yml, if: … && matrix.shard == 1. timeout-minutes: 20 is untouched, heavyDomTests is untouched, and the three existing projects (unit, dom, dom-heavy) are untouched.

5. The step-2 tripwire. Not tripped, but it was close, and the near-miss is the design: see The opt-in below.

The opt-in — the half that keeps pnpm test unchanged

CI's test job runs pnpm test (vitest run) with no build step anywhere in it. An unconditional fourth project is therefore collected by that run with no dist on disk, and its precondition would fail the whole suite on every PR — which would have forced a build into the path of all ~2000 tests, i.e. exactly the "change to how all tests build" constraint 5 says to stop at.

So the project is declared only when OBJECTUI_DIST_PINS=1. An env var rather than the --project dist flag, because argv is meaningful only in the process that parsed the CLI while the env var is inherited by everything Vitest spawns.

That opens exactly one false-green, and it is closed in the config rather than documented: vitest run --project dist without the env var would match no project, and passWithNoTests is true for a run that names no files — a green that measured nothing. Measured:

$ pnpm exec vitest run --project dist        # no env var
exit=1
Error: vitest --project dist was requested, but OBJECTUI_DIST_PINS is not "1", so the
`dist` project is NOT declared and this run would collect ZERO files and exit GREEN.

The three verdicts

Each quotes the run's own output. Both mutating legs restore under a trap with absolute paths and prove the mutation landed on disk by marker count — never by an editor's exit code.

(i) dist present, run the way CI runs it — GREEN.

$ pnpm test:dist
V1_EXIT=0
 Test Files  1 passed (1)
 Tasks:    9 successful, 9 total

(ii) dist deleted — a loud, named precondition FAILURE, not a skip and not MODULE_NOT_FOUND.

MUTATION PROVEN: test -e /home/user/objectui-issue-7183/packages/components/dist => false
V2_EXIT=1
     × precondition: the package under test has been built 9ms
AssertionError: The built entry /home/user/objectui-issue-7183/packages/components/dist/index.js
does not exist, so this built-artifact pin has NOTHING to measure. It must fail rather than
skip. […]: expected false to be true
 Test Files  1 failed (1)
      Tests  3 failed (3)

Restore proven by state, not by an exit code: sha256 of the restored dist/index.js equals the recorded 5365d829….

(iii) the dist import removed — the recorded control.

PRE  target-count=1  PRE_HASH=1f531adf…  HEAD_BLOB=1f531adf…
POST target-count=0  inject-count=1  POST_HASH=8b6277f1…
MUTATION PROVEN ON DISK (target 1->0, inject 0->1, blob hash moved)
V3_EXIT=1
     × registers page:header from the BUILT bundle 6ms
AssertionError: expected undefined to be truthy
 Test Files  1 failed (1)
      Tests  2 failed | 1 passed (3)

expected undefined to be truthy — verbatim what PR #7180 recorded. The one case that still passes is the precondition, which is correct: dist is on disk in this leg; only the import is gone. Restore proven by state: restored blob 1f531adf… equals the HEAD blob, and git diff HEAD and git status --short are both empty.

Cost — measured, because the ruling priced this at "one build in one job"

A bare turbo run test:dist does not cost one build. Turbo applies a task definition to every package in scope and resolves dependsOn: ["build"] for each, so it schedules a build of the entire monorepo — site and console included:

$ turbo run test:dist --dry=json          → 45 tasks (44 builds + 1 test:dist)
$ turbo run test:dist --filter=@object-ui/components --dry=json
                                          → 9 tasks
  components#build components#test:dist core#build data-objectstack#build
  i18n#build react#build react-runtime#build sdui-parser#build types#build

The root script therefore carries --filter=@object-ui/components, and the 9 tasks are the package plus the dependency closure its .d.ts emit genuinely needs. Cold-cache wall time, which is what CI pays:

COLD_EXIT=0  COLD_WALL_SECONDS=72
 Tasks:    9 successful, 9 total
Cached:    0 cached, 9 total
  Time:    1m10.762s

~72 s added to shard 1 of a job whose ceiling is timeout-minutes: 20, unchanged. (Shared-box seconds: four sibling agents build in this container, so this is an upper-ish bound, not an idle-box figure.)

If a second package ever gains a pin without being added to the filter, the failure is the loud precondition naming its missing built entry — not a silent skip.

Collected by exactly one project

vitest list --filesOnly is the instrument, and it has a positive control:

unit:      files=810   pin=0
dom:       files=1429  pin=0
dom-heavy: files=34    pin=0
dist:      [dist] packages/components/src/__tests__/page-header-action-ids.dist.spec.tsx

The suffix does this by construction — unit collects *.test.ts, dom collects *.test.tsx, dom-heavy is an explicit file list — so none of the three needed a character changed.

The same property keeps the file out of packages/components/tsconfig.test.json, and that is deliberate rather than incidental: turbo's type-check waits on ^build, so a type program that read this package's own dist would demand an artifact type-check is not allowed to wait for — the coupling #4801 removed. Measured with the package's own type program, with a control:

$ tsc -p tsconfig.test.json --listFiles
page-header-action-ids.dist.spec.tsx  → 0 files   (out of the program, as designed)
page-header-action-ids.test.tsx       → 1 file    (control: siblings ARE in it)

Gates — union re-run at commit 7a6eef7b9

Gate Verdict line
vitest run scripts/ exit 0 — Test Files 94 passed (94) / Tests 2645 passed (2645)
pnpm --filter @object-ui/components run type-check exit 0
pnpm check:control-bytes exit 0 — "OK (scanned 6010 tracked text file(s); skipped 85 binary)"
pnpm type-check:scripts exit 0
pnpm check:doc-fences exit 0 — "every TypeScript block in 224 document(s) is fenced…"
pnpm check:doc-types exit 0 — "Every documented component type is registered."
pnpm docs:check-links exit 0 — "Links are valid across 17 scan roots."
check-changeset-presence exit 0 — "declares 1 changeset(s) … Every one of them has an EMPTY frontmatter"
check-changeset-overwrite / -no-major / -fixed exit 0 each
eslint on the changed files exit 0 — 0 errors, 0 warnings

Every exit code was captured before any pipe. The lint run is narrowed and the narrowing is measured: the population is the diff, the count comes from --format json (3 files), and eslint.config.js contains 0 projectService / parserOptions / project: occurrences against a live control of 10 rules hits in the same file — not type-aware, so no untouched file's verdict can move under this diff.

Changeset: an empty frontmatter, which the presence gate names as a pass rather than a workaround. The one file it flags is under packages/components/src/ but ships nowhere — the package publishes files: ["dist", …] and its build tsconfig.json excludes src/__tests__ outright.

Corrections and deviations, stated rather than buried

The first run of all three verdicts was invalid and was thrown away. The pin file's docstring contained a glob pairing a star with a slash, which ends a block comment early; the file failed to parse, so verdict (i) was red and (ii)/(iii) reported Tests no tests — a transform error, not an assertion. vitest list --filesOnly had passed because it never transforms. Fixed, and all three verdicts above are from the re-run. This repo already records the same trap in tsconfig.scripts.json's header and in check-changeset-presence.mjs.

Three files beyond the dispatch's declared surface, each forced by a gate or by turbo's shape:

  • packages/components/package.json — one script. Turbo tasks are per-package, so dependsOn: ["build"] for the package under test cannot be expressed without a script in that package. It carries --root ../.. because the invocation guard refuses any run whose Vitest root is not the repo root, and --config vitest.config.mts because Vite resolves configFile relative to root, not cwd (measured: ../../vitest.config.mts resolved to /home/vitest.config.mts).
  • content/docs/guide/ci-cd-pipeline.md — one cell. scripts/__tests__/ci-cd-pipeline-doc.test.ts fails when the workflow runs a first-party command the job table does not name. It also fails if the cell names a command the job does not run, which is why the turbo invocation is described in prose there rather than as a code span.
  • scripts/__tests__/turbo-task-guard-coverage.test.ts — one docstring line. That test enforces the partition "cacheable ⇒ has a derived inputs guard; otherwise cache: false", and its docstring enumerates the partition. test:dist is cache: false — a lane whose subject is a build artifact turbo does not hash must never replay a verdict — so it belongs on the uncached side, and the enumeration now says so.

⛔ No change to the root alias map. ⛔ No timeout raised. ⛔ No heavy-test allowlist entry. ⛔ No skip-changeset label — in this repo that label is inert and the empty-frontmatter changeset is the declaration that counts.

Not in this PR

Nothing migrates into the new lane. Its scarcity is the guard against it becoming a second default test surface, and the ruling asks for exactly one resident.

Fix round — Type Check was red on the first push

What was red. @object-ui/console#type-check, run 33588494358 / job 100117481182. Three errors, all one cause:

../../vitest.config.mts(311,7): error TS2769: No overload matches this call.
../../vitest.config.mts(325,7): error TS2769: No overload matches this call.
vitest.config.ts(11,15): error TS2345: Argument of type 'UserConfig & …' is not assignable to parameter of type 'never'.

Cause, one line. Inside the conditional spread that declares the dist project, the literal extends: true widens to boolean, while TestProjectConfiguration.extends is string | true | undefined — so the element matched no defineConfig overload and the whole projects array degraded to never[], which then took down the console entry on line 325 too.

Fix. extends: true as const, plus a comment recording why the annotation is load-bearing (it reads like removable noise). Nothing else changed; the three pre-existing projects never widened, because their extends: true sits in the plain array rather than in a conditional one.

Why CI saw it and this PR's own gates did not. The root vitest.config.mts is compiled by no type program of its own — apps/console/vitest.config.ts merges it, so the console's tsc --noEmit is the program that reads it. That job was outside the gate set run before the first push. It is in the set now.

Reproduced before fixing, not after. On an unbuilt worktree the real errors are unreachable behind 378 TS2882s, so the dependency closure was built through turbo first (turbo run type-check --filter=@object-ui/console), which is the path CI takes:

exit error TS lines
before the fix 1 3
after the fix 0 0

Re-run at the fix commit 857c8afc5 (exit codes captured by redirect-then-$?):

Check Verdict
pnpm --filter @object-ui/console run type-check exit 0 — 0 error TS lines (was exit 1 / 3)
pnpm --filter @object-ui/components run type-check exit 0
pnpm type-check:scripts exit 0
pnpm type-check:vitest-setup exit 0
pnpm type-check (turbo, every package) exit 0 — Tasks: 81 successful, 81 total
pnpm test:dist exit 0 — Test Files 1 passed (1), Tasks: 9 successful, 9 total
vitest list --filesOnly --project dist exit 0 — exactly 1 pin; unit/dom/dom-heavy still 0 (files 810 / 1429 / 34)
vitest run --project dist without the env var exit 1 — the opt-in refusal still fires

No rebase and no force-push: the fix is a commit on top of the branch.


🤖 Generated with Claude Code

https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b

The root `vitest.config.mts` aliases every workspace package to its `src`,
which is right for the ~2000 tests that want fast source feedback and leaves
"does the SHIPPED BUNDLE still do X" unanswerable. Such a test could not be
committed: turbo's `test` task is `dependsOn: ["^build"]` — the DEPENDENCIES'
builds, not the package's own — so a `dist`-importing test landed in CI with no
`dist` to import. That is NOT MEASURED rather than a red pin, and the usual
repair (delete it, or let it skip when `dist` is missing) leaves a green suite
that measures nothing. Two lanes hit this wall in one morning and each threw a
correct measurement away.

Implements the PM ruling on objectui#7183 (option 1, 2026-09-02):

- `vitest.config.mts` gains a fourth project, `dist`, collecting
  `packages/*/src/**/*.dist.spec.tsx`. The suffix keeps these files out of
  `unit`, `dom` and `dom-heavy` BY CONSTRUCTION — none of the three needed a
  character changed — and out of each package's `tsconfig.test.json`, which
  matters because turbo's `type-check` waits on `^build` and must never read
  the package's own `dist` (objectui#4801).
- The project is OPT-IN behind `OBJECTUI_DIST_PINS=1`. CI's test job runs
  `pnpm test` with no build step, so an unconditional fourth project would be
  collected there with no `dist` on disk and would fail every PR. The one
  false-green this opens — `--project dist` without the env var collecting zero
  files and exiting green — is refused in the config with a message naming the
  right command.
- `turbo.json` gains `test:dist`, `dependsOn: ["build"]` (self, not `^build`),
  `cache: false`: a lane whose subject is a build artifact turbo does not hash
  must not replay a verdict. That places it on the uncached side of the
  partition `scripts/__tests__/turbo-task-guard-coverage.test.ts` enforces,
  whose docstring is updated to match.
- The light dom setup is deliberate, not a cost optimisation:
  `vitest.setup.dom.tsx` registers `page:header` from SOURCE, which would keep
  a pin green with the built bundle removed entirely.

First resident: the objectui#6252 acceptance criterion PR objectui#7180 measured
by hand and could not commit — an id-authored `page:header` resolves through the
BUILT renderer and carries no `body.source` into the DOM or the authored node.
Its live control is part of the pin: with the `dist` import removed the run
fails `expected undefined to be truthy`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 48 chunks) 3160.2 KB 3191.4 KB
Main entry chunk (gzip) 142.6 KB 350 KB
Entry file index-BOEfHVe7.js —
Status PASS —

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

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 15.33KB 5.59KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 5.13KB 2.35KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 514.46KB 117.29KB
core (index.js) 5.55KB 2.23KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 178.20KB 49.60KB
fields (index.js) 244.25KB 61.73KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 4.28KB 1.75KB
i18n (index.js) 3.44KB 1.39KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 33.40KB 8.71KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.98KB 10.98KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.55KB 0.62KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useResponsiveConfig.js) 1.37KB 0.63KB
mobile (useSpecGesture.js) 4.32KB 1.64KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 11.71KB 4.29KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 5.12KB 1.74KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 15.75KB 3.80KB
plugin-calendar (index.js) 46.92KB 12.93KB
plugin-charts (index.js) 70.02KB 19.44KB
plugin-chatbot (index.js) 190.53KB 45.18KB
plugin-dashboard (index.js) 132.63KB 34.56KB
plugin-designer (index.js) 212.87KB 43.19KB
plugin-detail (index.js) 250.65KB 63.91KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 132.78KB 32.58KB
plugin-gantt (index.js) 166.77KB 40.76KB
plugin-grid (index.js) 208.88KB 56.59KB
plugin-kanban (index.js) 53.21KB 14.66KB
plugin-list (index.js) 113.51KB 27.67KB
plugin-map (index.js) 20.20KB 6.66KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 43.51KB 11.94KB
plugin-timeline (index.js) 29.34KB 8.47KB
plugin-tree (index.js) 8.98KB 3.08KB
plugin-view (index.js) 85.90KB 21.12KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 81.07KB 26.86KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 3.11KB 1.48KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 5.41KB 2.34KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 4.93KB 2.24KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 20.57KB 5.88KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 10.35KB 3.60KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.74KB 1.41KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.72KB 2.24KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 2.59KB 1.31KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 3.40KB 1.71KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

Copy link
Copy Markdown
Contributor Author

CI red on 7a6eef7b9 — Type Check (job 100117481182), this PR's own defect, fix in flight.

@object-ui/console#type-check runs tsc --noEmit over apps/console/vitest.config.ts, which imports the root vitest.config.mts. The new dist project entry inside the conditional spread is inferred as { extends: boolean; … } (the true literal widens inside the array in the conditional), and TestProjectConfiguration.extends is string | true | undefined, so ../../vitest.config.mts(311,7) / (325,7) report TS2769 and the console config fails at (11,15). The fix is keeping the literal narrow (extends: true as const); the dev is reproducing on pnpm --filter @object-ui/console run type-check before and after, re-running the type programs, and pushing a fix commit on this branch. The local verification ran the components package's type program only, which cannot see the console's read of the root config — the fix round will say so.


Generated by Claude Code

… still type-checks

The `dist` project entry added for objectui#7183 sits inside a conditional
spread, and inside that array literal `extends: true` widens to `boolean`.
`TestProjectConfiguration.extends` is `string | true | undefined`, so the widened
element matches no `defineConfig` overload and the whole `projects` array
degrades to `never[]`:

    ../../vitest.config.mts(311,7): error TS2769: No overload matches this call.
    ../../vitest.config.mts(325,7): error TS2769: No overload matches this call.
    vitest.config.ts(11,15): error TS2345: Argument of type 'UserConfig & …'
        is not assignable to parameter of type 'never'.

CI reported it on `@object-ui/console#type-check` rather than here, because
`apps/console/vitest.config.ts` merges this config and is the type program that
reads it — the root `.mts` is compiled by nobody on its own.

`as const` keeps the literal narrow. The three pre-existing projects are
unaffected: their `extends: true` sits in the plain array, where it never
widened. A comment records why the annotation is load-bearing, since it reads
like removable noise.

Measured red -> green on the reported program, deps built through turbo first
(the errors are unreachable behind 378 TS2882s on an unbuilt tree):

    before  exit 1, 3 errors
    after   exit 0, 0 errors

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 48 chunks) 3160.2 KB 3191.4 KB
Main entry chunk (gzip) 142.6 KB 350 KB
Entry file index-BOEfHVe7.js —
Status PASS —

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

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 15.33KB 5.59KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 5.13KB 2.35KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 514.46KB 117.29KB
core (index.js) 5.55KB 2.23KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 178.20KB 49.60KB
fields (index.js) 244.25KB 61.73KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 4.28KB 1.75KB
i18n (index.js) 3.44KB 1.39KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 33.40KB 8.71KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.98KB 10.98KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.55KB 0.62KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useResponsiveConfig.js) 1.37KB 0.63KB
mobile (useSpecGesture.js) 4.32KB 1.64KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 11.71KB 4.29KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 5.12KB 1.74KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 15.75KB 3.80KB
plugin-calendar (index.js) 46.92KB 12.93KB
plugin-charts (index.js) 70.02KB 19.44KB
plugin-chatbot (index.js) 190.53KB 45.18KB
plugin-dashboard (index.js) 132.63KB 34.56KB
plugin-designer (index.js) 212.87KB 43.19KB
plugin-detail (index.js) 250.65KB 63.91KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 132.78KB 32.58KB
plugin-gantt (index.js) 166.77KB 40.76KB
plugin-grid (index.js) 208.88KB 56.59KB
plugin-kanban (index.js) 53.21KB 14.66KB
plugin-list (index.js) 113.51KB 27.67KB
plugin-map (index.js) 20.20KB 6.66KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 43.51KB 11.94KB
plugin-timeline (index.js) 29.34KB 8.47KB
plugin-tree (index.js) 8.98KB 3.08KB
plugin-view (index.js) 85.90KB 21.12KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 81.07KB 26.86KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 3.11KB 1.48KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 5.41KB 2.34KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 4.93KB 2.24KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 20.57KB 5.88KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 10.35KB 3.60KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.74KB 1.41KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.72KB 2.24KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 2.59KB 1.31KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 3.40KB 1.71KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@yinlianghui
yinlianghui marked this pull request as ready for review September 2, 2026 05:14
@yinlianghui
yinlianghui added this pull request to the merge queue Sep 2, 2026
Merged via the queue into main with commit dd5b01b Sep 2, 2026
31 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-7183-dist-vitest-project branch September 2, 2026 05:29
os-sales pushed a commit that referenced this pull request Sep 3, 2026
…erdict (#3240)

Direction A, ruled by the maintainer 2026-08-06 and reaffirmed by the delegated
ruling of 2026-08-10: the root `vitest.config.mts` becomes the single entry, and
a per-package run reaches it by path filter.

What was there: 19 non-root vitest configs (the card's 17 under `packages/`,
plus `apps/console` and `examples/schema-catalog`). Eleven of the seventeen were
byte-identical standalone `defineConfig`s — `happy-dom` + `globals` + a one-line
local setup and NO alias table, where the root config maps ~40 `@object-ui/*`
specifiers at a sibling's `src/`. The other six re-exported or merged the root
config, so they only ever restated it.

What replaces them, per package: nothing. The root config already supplies every
property they declared — `globals`, `happy-dom`, and jest-dom via
`vitest.setup.dom-light.tsx` — plus the alias table they lacked. The one setup
file that was not the shared one-liner, `plugin-map`'s, mocked `maplibre-gl`;
`vitest.setup.base.ts` has mocked it globally all along, so that copy was a
duplicate no canonical invocation ever loaded.

Redefining the per-package run (the ruling's second clause): every `test` script
is now `vitest run --root ../.. <pkgdir>/`, the shape PR #3869 landed for
`packages/runner`. `pnpm --filter <pkg> test` and `turbo run test` were REFUSED
by the invocation guard before this; they now run, against the same config CI
uses, over exactly that package's files.

Closing route 4 first, which the ruling did not anticipate: Vitest's config
fallback does not stop at `vitest.config.*`. With none present it takes the
directory's `vite.config.*`, and every `packages/*` has one — carrying a
vestigial `test` block (`passWithNoTests: true`, a partial alias table, a setup
the root config never loads). Deleting the 14 vitest configs whose packages also
have a vite config would have moved them onto that route, widening the hole
#5406 closed in the name of closing it. So each `packages/<pkg>/vite.config.ts`
now calls the guard — gated on `process.env.VITEST`, which Vitest sets when it
loads a config and `vite build` does not (measured both ways) — and the
vestigial `test` blocks are deleted.

turbo's `test` keeps `dependsOn: ["^build"]`, for a re-derived reason. The reason
of record was resolution through `dist`, and that is now obsolete. But `^build`
is the only edge putting a dependency's sources into a dependent's `test` cache
key, and `helpers/vitest-config-program.ts` narrows its sweep by delegating to
exactly that. Dropping it would replay stale greens; the note now says so.

Evidence: `vitest list --filesOnly` from the repo root is byte-identical before
and after — 2434 (project, file) pairs, empty diff. `vitest.config.mts` and all
four root setup files are unchanged, so no file's project, environment or setup
moved. #7291's `dist` project (`pnpm test:dist`: 1 file / 3 tests) and #7309's
`isolate: false` invariant both still hold.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019aCUUSwWefnbCJ4Xk1vqQW
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 9, 2026
…e configs (objectstack-ai#3240) (objectstack-ai#7523)

* test(repo): delete the per-package vitest configs — one config, one verdict (objectstack-ai#3240)

Direction A, ruled by the maintainer 2026-08-06 and reaffirmed by the delegated
ruling of 2026-08-10: the root `vitest.config.mts` becomes the single entry, and
a per-package run reaches it by path filter.

What was there: 19 non-root vitest configs (the card's 17 under `packages/`,
plus `apps/console` and `examples/schema-catalog`). Eleven of the seventeen were
byte-identical standalone `defineConfig`s — `happy-dom` + `globals` + a one-line
local setup and NO alias table, where the root config maps ~40 `@object-ui/*`
specifiers at a sibling's `src/`. The other six re-exported or merged the root
config, so they only ever restated it.

What replaces them, per package: nothing. The root config already supplies every
property they declared — `globals`, `happy-dom`, and jest-dom via
`vitest.setup.dom-light.tsx` — plus the alias table they lacked. The one setup
file that was not the shared one-liner, `plugin-map`'s, mocked `maplibre-gl`;
`vitest.setup.base.ts` has mocked it globally all along, so that copy was a
duplicate no canonical invocation ever loaded.

Redefining the per-package run (the ruling's second clause): every `test` script
is now `vitest run --root ../.. <pkgdir>/`, the shape PR objectstack-ai#3869 landed for
`packages/runner`. `pnpm --filter <pkg> test` and `turbo run test` were REFUSED
by the invocation guard before this; they now run, against the same config CI
uses, over exactly that package's files.

Closing route 4 first, which the ruling did not anticipate: Vitest's config
fallback does not stop at `vitest.config.*`. With none present it takes the
directory's `vite.config.*`, and every `packages/*` has one — carrying a
vestigial `test` block (`passWithNoTests: true`, a partial alias table, a setup
the root config never loads). Deleting the 14 vitest configs whose packages also
have a vite config would have moved them onto that route, widening the hole
objectstack-ai#5406 closed in the name of closing it. So each `packages/<pkg>/vite.config.ts`
now calls the guard — gated on `process.env.VITEST`, which Vitest sets when it
loads a config and `vite build` does not (measured both ways) — and the
vestigial `test` blocks are deleted.

turbo's `test` keeps `dependsOn: ["^build"]`, for a re-derived reason. The reason
of record was resolution through `dist`, and that is now obsolete. But `^build`
is the only edge putting a dependency's sources into a dependent's `test` cache
key, and `helpers/vitest-config-program.ts` narrows its sweep by delegating to
exactly that. Dropping it would replay stale greens; the note now says so.

Evidence: `vitest list --filesOnly` from the repo root is byte-identical before
and after — 2434 (project, file) pairs, empty diff. `vitest.config.mts` and all
four root setup files are unchanged, so no file's project, environment or setup
moved. objectstack-ai#7291's `dist` project (`pnpm test:dist`: 1 file / 3 tests) and objectstack-ai#7309's
`isolate: false` invariant both still hold.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019aCUUSwWefnbCJ4Xk1vqQW

* chore(changeset): declare objectui#3240 as releasing nothing

`check-changeset-presence` counts three files under a released package's `src/`:
comments in `plugin-calendar`, `plugin-map` and `plugin-timeline` test files, each
naming a config or setup file this change deletes. No runtime or type surface
moves, so the empty frontmatter is the declared answer the gate asks for, not a
workaround.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019aCUUSwWefnbCJ4Xk1vqQW

---------

Co-authored-by: Claude <noreply@anthropic.com>
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 9, 2026
…stack-ai#8004)

The repo-root `vitest.config.mts` had no runnable gate of its own
(objectui#7328). A program did already contain it —
`apps/console/tsconfig.node.json` has listed `../../vitest.config.mts` and
`vitest.config.ts` since objectui#3476 — but the only invocation of that
program was the console's own `type-check` script, reached through the task
runner, whose `type-check` task waits on `^build`. So the cheapest compiler in
the repo that reads the root Vitest config was reachable only behind a full
workspace build, and no local gate union short of that could go red on it.

PR objectstack-ai#7291 is the measured cost: a conditionally spread `dist` project whose
literal `extends: true` widened to `boolean` degraded the whole `projects`
array to `never[]`; `type-check:scripts`, `type-check:vitest-setup` and the
vitest runs were all green, and CI answered with three errors, two of them
reported at `../../vitest.config.mts`.

Adding the file to an existing root program was measured and is not available:
`tsconfig.scripts.json` includes only `scripts/**/*.ts` and
`tsconfig.vitest-setup.json` only `./vitest.setup*.ts(x)`, neither glob admits
`.mts`, and the setup program deliberately ships no `@types/node` while the
root config imports `path` and `url`. A NEW root program was measured too: its
resolved source set is the same nine files as
`apps/console/tsconfig.node.json`'s, so it would only add a second option set
over seven shared files — the "green in one project, red in the other" hazard
`tsconfig.scripts.json`'s header documents.

So the program keeps its single home and gains a second, cheap runner:
`type-check:vitest-config` invokes it directly, in the cheap half of the
`Type Check` job beside `pnpm type-check:scripts`. Nothing in its program
imports an `@object-ui/*` package (the 40 `@object-ui/*` occurrences in
`vite.config.ts` are alias-map strings), so it needs the install and nothing
built: 2.0s on a worktree with no `dist/` anywhere.

`scripts/__tests__/vitest-config-type-check.test.ts` pins the behaviour — that
every root `vitest.config.*` is in the resolved program, that the merging
consumer is too, that `allowJs` stays off so the root config's
`@ts-expect-error` remains live, and that CI runs the script before the build.


Claude-Session: https://claude.ai/code/session_01MM7kaS4dPpYHV5BsMyu4tQ

Co-authored-by: Claude <noreply@anthropic.com>
os-sales pushed a commit that referenced this pull request Sep 18, 2026
…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
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 28, 2026
…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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

2 participants