Skip to content

test(scripts,types): judge the spawned-build env by REMOVAL, and correct three comments that outran their measurement (objectui#8712) - #9014

Merged
baozhoutao merged 1 commit into
mainfrom
claude/issue-8712-ratchet-vacuous-green
Sep 10, 2026
Merged

baozhoutao merged 1 commit into
mainfrom
claude/issue-8712-ratchet-vacuous-green

Conversation

@baozhoutao

Copy link
Copy Markdown
Contributor

Fixes #8712

Every item on that card was carried as a premise, not a fact — the card's own fence, adopted verbatim by triage. ⭐ Each was re-measured on origin/main = 2596b1b85 before anything was touched. All three actionable items reproduce; ④ and ⑤ are recorded-only by the card's own words and ⛔ nothing was changed for them.


① The ratchet had a vacuous green and a false positive — both reproduced, both closed

The gate over builds a test spawns judged the resolved env: expression by whether the token VITEST occurs in it. Removal is the property it exists to hold, and presence is the wrong question in both directions at once.

Re-measured on the tip above — one file mutated, one command, the gate's own exit code:

mutation to the spawned build's env old predicate new predicate
{ ...process.env, VITEST: 'true' } — a tree that SETS the variable ⛔ exit 0, 2 passed ✅ exit 1, both spawns named this environment SETS \VITEST``
const { VITEST: _v, ...BUILD_ENV } = process.env — a correct, idiomatic scrub ⛔ exit 1 at both spawns ✅ exit 0, 2 passed
{ /* VITEST must not reach a build this test spawns. */ ...process.env } — the token in a comment only ⛔ exit 0, 2 passed ✅ exit 1, both spawns named hands the child \VITEST` unchanged`

⭐ The third row is not on the card. It is the shape the file's own header already names as the thing to refuse — a call site somebody explained instead of fixing — and it was measured to pass. It was taken against the old gate restored from 2596b1b85 in the same tree, so both halves of that row are real runs, not inference.

What changed: the env expression is read as an AST and classified by what it does to the key — delete env.VITEST on a copy and a { VITEST: _v, ...rest } rest pattern are both accepted, an object literal that assigns VITEST is refused by name, everything else is inherits. ⛔ Nothing was widened to make a case pass: every shape that passed before and is genuinely a scrub still passes, and two shapes that used to pass no longer do.

Name resolution stays exactly as narrow as it was — the declaration of the name the spawn passes, plus names spread into it, never the whole file — so a comment about the variable resolves to nothing. The population walk, the floor and NAMED_MEMBER are untouched.

⚠️ Every mutation was restored and the restore proved by hash, never by an exit code: each run re-read the target's blob and compared it to its HEAD blob, and confirmed git diff HEAD named no files. The two mutated blobs are byte-identical between the before and after runs (580275ce… for the setter, 9254390… for the rest pattern), so the two columns above differ only in the predicate.

② Both emptyOutDir comments stated a measured falsehood — the claim reproduced, the quoted string did not

⚠️ The card quotes a comment saying a flip deletes the published package and "the build still exits 0". In the build config that exact phrase is gone; the claim is not — it still asserts a flip "would delete the whole published package and leave one bundle". The pin's header carries both halves verbatim. ⛔ So this was re-measured as a claim, not grepped as a string.

Measured on the same tip, vite build --emptyOutDir in the types package:

pnpm exec vite build --emptyOutDir   → exit 0
    dist/  128 → 89 files;  dist/zod/  40 → 1
node ../../scripts/check-dist-completeness.mjs → exit 1
    "missing 39 of 128 files tsc emits"

outDir is a subdirectory, so a flip empties dist/zod/ — the ./zod typings and every per-category zod module — and leaves the other 89 files standing. And it is not silent: vite build itself exits 0, but the build script's third step reds. ⭐ The gate is sound and unchanged; only the two sentences about it move, now stating the measured effect and attributing it to the commit it was measured on. The stale "124 files" in the same sentence went with them.

③ A case name outran what it measures

Against an ablated tsc barrel of 30 separate relative specifiers, the built-artifact pin reds — Tests 1 failed | 4 passed, the failure being the structural case — while the case named for a single-schema entry passed. A vitest import evaluates the whole barrel, as that file's own header says, so no case in it can measure a single-schema entry. It is renamed to the accept-set control it actually is, and the reason is recorded beside it. The bundle was restored and the restore proved by hash (44404e1d…).

④ / ⑤ — ⛔ no change

Recorded-only by the card's own words. Neither asks for one and neither got one.


⚠️ The neighbour, checked and ⛔ not fixed here

The gate objectui#8997 landed 40 minutes before this card was dispatched has the same textual shape, and ⭐ its narrower hole is reachable: a spawn whose env declaration merely names childVitestEnv() in a comment is accepted, while the identical file without that comment is refused. Measured with a probe plus its control, both runs restored. ⛔ Not touched here — that card is closed, its gate is not this card's surface, and a floor protects four pinned files' assertion counts. Filed bare with the measurement as #9013.


Verification

what result
the changed gate pnpm exec vitest run scripts/__tests__/spawned-build-vitest-env-8598.test.ts — 2 passed
the sibling gate it walks past spawned-vitest-child-env-8616.test.ts + the config pin — 3 files, 12 passed
the built-artifact pin OBJECTUI_DIST_PINS=1 … --project dist — 5 passed
type-check type-check:scripts exit 0 — and --listFiles confirms the changed gate is in that program; @object-ui/types type-check exit 0 (all three of its projects)
lint eslint --format json on all four changed files: 4 files linted, 0 errors, 0 warnings
gates check-changeset-presence ✅ (one changeset, empty frontmatter — nothing published changes) · check-control-bytes ✅ · check-new-cross-file-line-citations 0 new · check-governed-queue-guard --test → NOT GOVERNED

⛔ Left in draft: not flipped ready, not enqueued, no auto-merge. The PM seat lands it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr


Generated by Claude Code

…ect three comments that outran their measurement (objectui#8712)

The objectui#8598 ratchet over builds a test spawns asked whether the token
`VITEST` occurs in the resolved `env:` expression. Removal is the property it
exists to hold, and presence is the wrong question in both directions at once.
Re-measured on `2596b1b85`, one file, one command, varying only the environment
`packages/cli/src/__tests__/cli-bin.test.ts` hands its two build spawns:

  env: { ...process.env, VITEST: 'true' }        exit 0, 2 passed  -- a tree
      that SETS the variable passes the gate that exists to remove it
  const { VITEST: _v, ...BUILD_ENV } = process.env
                                                exit 1 at both spawns -- a
      correct scrub, written idiomatically, is refused

The env expression is now read as an AST and classified by what it DOES to the
key: `delete env.VITEST` on a copy and a `{ VITEST: _v, ...rest }` pattern are
both accepted, an object literal that assigns `VITEST` is refused by name, and
anything else is `inherits`. Name resolution stays as narrow as it was -- the
declaration of the name the spawn passes, plus the names spread into it -- so a
comment about the variable still resolves nothing. Both mutations above were
re-run against the new predicate and both flipped; every mutation was restored
to its HEAD blob and proved by hash.

Three comments are corrected to what was measured, which is the rest of the same
card. Two of them said a flipped `emptyOutDir` on the `./zod` bundle config
"deletes the published package" and that "the build still exits 0". Measured on
the same tip with `vite build --emptyOutDir`: `dist/` goes 128 files to 89, the
whole loss inside `dist/zod/` (40 to 1) because `outDir` is a SUBDIRECTORY, and
the build script's third step then reds with `missing 39 of 128 files tsc
emits`. The gate is sound and unchanged; only the sentences about it move. The
third is a built-artifact case named for a single-schema-entry measurement it
cannot make: a vitest import evaluates the whole barrel, so against an ablated
`tsc` barrel of 30 separate modules that case PASSED while the file went red
through the structural case beside it. It is renamed to the accept-set control
it is.

Fixes #8712

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

Co-authored-by: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 50 chunks) 3490.2 KB 3512.7 KB
Main entry chunk (gzip) 144.2 KB 350 KB
Entry file index-BQNoODeX.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) 16.69KB 6.21KB
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) 11.08KB 4.58KB
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) 500.20KB 114.67KB
core (index.js) 7.95KB 3.19KB
create-plugin (index.js) 28.21KB 9.54KB
data-objectstack (index.js) 207.32KB 57.37KB
fields (index.js) 247.01KB 62.29KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 6.57KB 2.76KB
i18n (index.js) 3.65KB 1.47KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.84KB 10.94KB
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.99KB 0.87KB
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 (useSpecGesture.js) 4.39KB 1.66KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.52KB 4.88KB
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) 8.39KB 3.10KB
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) 14.81KB 3.63KB
plugin-calendar (index.js) 49.03KB 13.93KB
plugin-charts (index.js) 71.63KB 19.99KB
plugin-chatbot (index.js) 195.32KB 46.51KB
plugin-dashboard (index.js) 130.98KB 34.54KB
plugin-designer (index.js) 215.68KB 44.27KB
plugin-detail (index.js) 253.71KB 65.78KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 136.79KB 34.19KB
plugin-gantt (index.js) 166.65KB 40.91KB
plugin-grid (index.js) 210.87KB 57.30KB
plugin-kanban (index.js) 46.03KB 14.30KB
plugin-list (index.js) 112.52KB 27.64KB
plugin-map (index.js) 20.49KB 6.83KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.42KB 11.92KB
plugin-timeline (index.js) 30.10KB 8.74KB
plugin-tree (index.js) 9.55KB 3.32KB
plugin-view (index.js) 84.42KB 20.80KB
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) 83.34KB 27.61KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.66KB 2.50KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (kanban-quick-add.js) 3.89KB 1.87KB
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) 14.82KB 4.99KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.93KB 1.49KB
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 (expression.js) 0.20KB 0.18KB
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.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 4.73KB 2.28KB
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 (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 14.27KB 5.47KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
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

@baozhoutao
baozhoutao marked this pull request as ready for review September 10, 2026 18:01
@baozhoutao
baozhoutao added this pull request to the merge queue Sep 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 10, 2026
@baozhoutao
baozhoutao added this pull request to the merge queue Sep 10, 2026
Merged via the queue into main with commit 9a07b5f Sep 10, 2026
36 checks passed
@baozhoutao
baozhoutao deleted the claude/issue-8712-ratchet-vacuous-green branch September 10, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

finding(types,scripts): the #8598 ratchet has a vacuous green and a false positive, and two of its shipped comments state measured falsehoods

2 participants