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

test(plugin-grid): gate the schema-level held-key census on its entry condition - #7556

Merged
os-project-manager merged 2 commits into
mainfrom
claude/issue-7201-schema-slot-census-gate
Sep 3, 2026
Merged

os-project-manager merged 2 commits into
mainfrom
claude/issue-7201-schema-slot-census-gate

Conversation

@claude

@claude claude Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #7201

Clause-②: no

The schema-level held-key census in packages/plugin-grid/src/ObjectGrid.tsx had no expiry gate. Its only pin asserted that the seam ACCEPTS renderCellEditor and cellClassName — true while the keys are held locally and equally true once they arrive through DeclaredDataTableSchema — so it stayed green across objectui#6882, the ruling that expired both holds. This transplants the column-level twin (columnHoldsExpiry-6424.test.ts) to the sibling census.

Scope is the narrow shape only, per the triage ruling in comment 5530018064. ⛔ No derivation gate over the census — that is the fourth-derivation-gate question the card reserves for a ruling, and the new docblock says so in the tree.

What landed

packages/plugin-grid/src/__tests__/dataTableSchemaSlot-6459.test.ts, three tests:

  1. The gate. A compile-time verdict per member of ObjectGridDataTableSchemaHolds, recording whether DataTableSchema declares that key — plus a pin on the member set itself, so the quantifier is per HOLD rather than per key somebody remembered.
  2. Controls on the probe. The verdict probe shown returning both verdicts, in the same query shape: a live declared key (columns), a live undeclared one (accessorKey, a real key from the column vocabulary next door), and a synthetic one.
  3. A control on the choice of type — see the second departure below.

ObjectGrid.tsx: one census paragraph, comment-only. It said "Nothing above is mechanically checked, which is how it went stale unseen", which this PR falsifies. Leaving that in place would be the exact defect class the card was filed against.

Two places the transplant is deliberately NOT literal

1. The probe reads DeclaredDataTableSchema, not DataTableSchema. This is the substantive finding of the card, and it is why the obvious gate would not have worked. DataTableSchema inherits BaseSchema's string index signature, so string extends keyof DataTableSchema and a membership probe against it is ALWAYS-TRUE — an instrument with no false to give. Measured, not argued: asserting that a nonsense key is not a member of the raw type is red, and green against the stripped type. A gate written the obvious way — asking DataTableSchema whether it declares the held key — would be green forever: the same failure this card was filed about, one level up. Pinned as its own control (test 3), so the choice is measured in the tree. DeclaredDataTableSchema is ObjectGrid.tsx's own existing strip, so this reuses the repo's machinery rather than adding a second one.

2. The verdict is recorded per hold, rather than fixed at "is NOT declared". The card's wording presumes the holds are live. They are not: objectui#6882 declared both keys, and objectui#7196 / PR #7202 already re-derived the prose to say so. A one-directional "is NOT declared" assertion would therefore be false on this tree for both keys — a permanently red suite, which cannot land and which no reader can act on. ⛔ Nothing was weakened to make it pass: the precedent itself carries both polarities for exactly this reason (headerIcon pinned as DECLARED at :64, pinned as NOT declared at :138), because its two keys are in different states. The recorded-verdict form is strictly stronger than the one-directional one — it reddens on the card's event (HELD to DECLARED) and on DECLARED to HELD, which is the event that would silently invalidate the "removing these members is inert" measurement objectui#6919 is waiting on. The "is NOT declared" shape is present and live in the suite; it runs on control keys, because there is no hold left to run it on.

The failure message

The verdict is a string literal, so a flip makes tsc print the old and the new one at the failing line, each naming the census prose that then needs re-deriving. Measured output of the first ablation below:

dataTableSchemaSlot-6459.test.ts(245,52): error TS2344: Type '"DECLARED by
DataTableSchema — this hold is REDUNDANT. Re-derive the census prose in
ObjectGrid.tsx (the census section, and the ObjectGridDataTableSchemaHolds
docblock under it) before changing anything."' does not satisfy the constraint
'"UNDECLARED by DataTableSchema — this hold is LOAD-BEARING. …"'.

An Expect of false would only have said that false does not satisfy true.

The census, re-derived rather than trusted

Counted on the tree at base 045d20ba8, ⛔ not read off the prose:

prose claim measured
46 flat-literal keys, 8 group-literal keys ✅ 46 and 8 exactly, by AST over both annotated literals (47 distinct)
the diff now leaves ZERO undeclared keys ✅ all 47 are members of DeclaredDataTableSchema (generated per-key probe, compiled clean)
each hold member's shape is Equal to the upstream declared member ✅ both, exact in both directions
the seam's renderCellEditor is the one visible trace — mutually assignable, not Equal ✅ Equal is false, mutual assignability true in both directions; the docblock's careful distinction is accurate
schema-level cellClassName folds at exactly three UTILITY cell sites ✅ data-table.tsx :2209 selection, :2226 row-number, :2554 row-actions; the data cell at :2312 folds col.cellClassName

⇒ Every claim held. Nothing was edited to agree with the gate. The only prose changed is the paragraph this PR itself falsifies.

⚠️ One correction, outside this diff: the triage's third row cites packages/types/src/data-display.ts:319 and :504 for the declaration. Those two lines are TableColumn.cellClassName and StaticTableColumn.cellClassName — the per-column twins, on d04e79a as well as today. The schema-level declarations the census is about are :1039 (renderCellEditor) and :1115 (cellClassName), both inside DataTableSchema. The substance of the claim is unaffected; the citation points at the wrong key, and #7196's whole correction turns on those two cellClassNames being different keys that style disjoint cells.

Reverse verification

Predicted red set first, then mutated. Every mutation proven on disk by anchor counts in both directions plus a blob-hash change; every restore proven by state (git diff HEAD empty and worktree blob equal to the HEAD blob), never by an exit code. Each leg ran from the committed implementation, under a restore trap on EXIT INT TERM with absolute paths.

⚠️ packages/plugin-grid/tsconfig.test.json sets "paths": {}, so @object-ui/types resolves through packages/types/dist/*.d.ts, not its source — verified with --listFiles. Ablation 1 is therefore rebuilt on both legs and the marker checked into and out of dist.

# mutation predicted measured
1 un-declare schema-level cellClassName on DataTableSchema (line 1115 only, ⛔ not the column twins), rebuild packages/types the cellClassName verdict pin reddens; the acceptance pin above stays green; all controls stay green ✅ exactly one diagnostic, at the verdict pin, with the message above. Marker into dist 1, out 0. The acceptance pin stayed green — that is the blindness this card is about, reproduced.
2 add a third member to ObjectGridDataTableSchemaHolds the member-set pin reddens ✅ exactly one diagnostic, at that pin
3 remove renderCellEditor from the holds (the objectui#6919 shape) the verdict pin fails its key constraint and the member-set pin reddens ✅ both, Type '"renderCellEditor"' does not satisfy the constraint '"cellClassName"'

Restores: sources byte-identical to HEAD, dist marker back to 0, dist real key back to 3, type-check green again.

Clause-② determination

Clause-②: no. Measured, not assumed:

  • ObjectGrid.tsx is comment-only — every added and removed line in that file matches a JSDoc or line-comment shape, zero non-comment lines changed. Declaration emit is a function of the declarations, so the published type surface is unchanged by construction. No key is declared, retired, widened or narrowed anywhere in this diff.
  • The suite lives in src/__tests__/, which packages/plugin-grid/tsconfig.json excludes from the build program by directory — re-confirmed green this run by check:published-tsconfig-exclude across all 33 enforced packages.
  • packages/types is what the pin reads, ⛔ not what it changes; it is untouched in the final tree.

⇒ Neither what any contract accepts nor the published surface moves. Draft, ⛔ no auto-merge, ⛔ no self-review.

Verification, on the final commit 016a44c81

  • pnpm --filter @object-ui/plugin-grid type-check (tsc --noEmit && tsc -p tsconfig.test.json) — exit 0
  • pnpm exec vitest run packages/plugin-grid/ — 112 files, 1012 tests passed
  • pnpm --filter @object-ui/plugin-grid lint — 0 errors (779 pre-existing warnings; --max-warnings is deliberately unset repo-wide)
  • check:control-bytes ✅ · check:vi-mock-specifiers ✅ · check:vi-mock-inherit ✅ · check:phantom-deps ✅ · check:published-tsconfig-exclude ✅ · check:self-import ✅
  • check-changeset-presence.mjs ✅ — empty-frontmatter changeset, the documented exemption for a change that releases nothing

Exit codes captured by redirect-then-read; ⛔ nothing judged through a pipe. Gate results quoted from each gate's own verdict line.

Declared narrowings — what was not measured, and what each could have caught:

  1. Repo-wide pnpm lint (turbo run lint) not run; packages/plugin-grid's own eslint . was, which is the complete population for the only package this diff touches. It could have caught a lint error in another package — but eslint here is not type-aware (tseslint.configs.recommended, no project / projectService in eslint.config.js), so every rule is file-local and this diff cannot move a verdict on a file it does not contain. No config file and no shared import changed.
  2. Other packages' type-check not run. It could have caught a consumer of @object-ui/plugin-grid breaking on a changed exported type — but no exported type changed (comment-only, above), and packages/types is untouched in the final tree.
  3. Full-repo pnpm test not run. It could have caught a suite elsewhere that reads these types; the plugin-grid suite that owns them is green in full, and no runtime value changed anywhere in this diff.

CI runs the whole farm regardless; these three are the cheap half deliberately not re-run locally.

objectui#6919, read before writing — how it bears

#6919 is pm:blocked, re-scoped by its PM disposition to the removal alone: delete renderCellEditor (and any sibling entry now redundant) from ObjectGridDataTableSchemaHolds. Its first half — the docblock prohibition — was already discharged by PR #7202. The live blocker is the CONTRACT_REVIEW_TIER quota, ⛔ not a missing measurement.

It changes this gate in three concrete ways, all handled:

  • It is why the gate is bidirectional. finding(plugin-grid): ObjectGridDataTableSchemaHolds' docblock forbids the exact declaration the 2026-08-30 ruling authorised — and the seam hold itself is now redundant #6919's whole deliverable rests on "the hold is inert, the members are redundant". If DataTableSchema ever stops declaring one of these keys, that measurement silently becomes false and the removal becomes a real narrowing. A one-directional "is NOT declared" pin cannot see that; the recorded verdict does.
  • It will make this suite go red, on purpose. Removing a member fails the verdict pin's key constraint and moves the pinned member set — ablation 3 above is that exact shape, measured. The docblock carries the one-line replacement (keyof ObjectGridDataTableSchemaHolds pinned to never) so the removal is a two-line edit, not an obstacle.
  • ⛔ It does not remove a key this gate needs. The gate is quantified over keyof ObjectGridDataTableSchemaHolds, whatever that is on the day. If both members go, the gate becomes the member-set pin alone and still guards the census against a hold silently reappearing.

Stop-condition

Re-deriving turned up no further stale claims beyond the two keys the card names — every prose claim measured above held on 045d20ba8. #7196's earlier 7-of-16 finding had already been corrected by PR #7202. Nothing was fixed silently; the one triage citation correction is reported above and ⛔ not touched in this diff.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EMrWaQw3XS5DxTHxp4yRyC


Generated by Claude Code

… condition

The schema-level census in `ObjectGrid.tsx` had no expiry gate. Its only pin
asserted that the seam ACCEPTS `renderCellEditor` and `cellClassName` — true
while the keys are held locally and equally true once they arrive through
`DeclaredDataTableSchema`, so it stayed green on both sides of objectui#6882,
the event that expired both holds.

Transplants the column-level twin (`columnHoldsExpiry-6424.test.ts`) to the
sibling census: a compile-time verdict per member of
`ObjectGridDataTableSchemaHolds` recording whether `DataTableSchema` declares
that key, plus a pin on the member set itself so the gate is per HOLD rather
than per key somebody remembered.

Two things the transplant could not copy literally, both measured:

- The probe reads `DeclaredDataTableSchema`, not `DataTableSchema`. The raw
  type inherits `BaseSchema`'s `[key: string]: any`, so
  `string extends keyof DataTableSchema` and a membership probe against it is
  ALWAYS-TRUE — an instrument with no `false` to give. Pinned as its own
  control, so the choice is measured rather than asserted.
- The verdict is recorded per hold rather than fixed at "is NOT declared".
  Both schema-level holds are already DECLARED upstream, so a one-directional
  "is NOT declared" would be false for both keys — a permanently red suite, not
  a gate. The precedent carries both polarities for the same reason.

The verdict is a string literal, so a flip makes `tsc` print the old and the
new one at the failing line, each naming the census prose that needs
re-deriving.

Census re-derived on this base rather than trusted: 46 flat-literal keys, 8
group-literal keys, all 47 distinct keys members of `DeclaredDataTableSchema`
(zero undeclared), schema-level `cellClassName` folded at exactly three utility
cell sites in `data-table.tsx`, and the docblock's `Equal`-vs-mutually-assignable
distinction confirmed in both directions. Every claim held; the one paragraph
corrected is the one this commit falsifies — "nothing above is mechanically
checked".

Part of #7201

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

Compile-time assertions under `src/__tests__/` plus one census paragraph in
`ObjectGrid.tsx`. No behaviour and no published API moves, so this is the empty
frontmatter exemption `scripts/check-changeset-presence.mjs` documents — the
declaration, not a release.

Part of #7201

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

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 50 chunks) 3182.6 KB 3191.4 KB
Main entry chunk (gzip) 143.2 KB 350 KB
Entry file index-D9dWy93Y.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.67KB 5.75KB
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) 516.19KB 117.80KB
core (index.js) 6.12KB 2.42KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 180.00KB 50.20KB
fields (index.js) 242.40KB 61.26KB
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) 4.28KB 1.75KB
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.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) 48.15KB 13.35KB
plugin-charts (index.js) 70.92KB 19.75KB
plugin-chatbot (index.js) 196.19KB 46.43KB
plugin-dashboard (index.js) 132.89KB 34.68KB
plugin-designer (index.js) 212.87KB 43.19KB
plugin-detail (index.js) 250.93KB 64.09KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 132.87KB 32.66KB
plugin-gantt (index.js) 167.44KB 41.05KB
plugin-grid (index.js) 209.25KB 56.71KB
plugin-kanban (index.js) 52.71KB 14.55KB
plugin-list (index.js) 113.28KB 27.59KB
plugin-map (index.js) 20.55KB 6.80KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 43.57KB 11.96KB
plugin-timeline (index.js) 30.84KB 8.85KB
plugin-tree (index.js) 9.38KB 3.22KB
plugin-view (index.js) 85.22KB 20.93KB
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) 4.63KB 2.18KB
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.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 4.58KB 2.23KB
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 (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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

2 participants