Found while implementing #6373 (retiring the six FieldMeta keys ObjectDataTable.enrich()wrote into the TableColumn[] slot). Filed unassigned. #6373's fence is the WRITE; this is the same seam's READ, and it is a different adjudication — retiring an inert write costs nothing, while these keys are load-bearing.
Measured (at 9602dc820)
packages/plugin-dashboard/src/ObjectDataTable.tsx, inside enrich(), the overrides handed to buildFieldMeta:
overrides: {type: col.type,format: col.format,options: col.options,referenceTo: (colasany).referenceTo,currency: (colasany).currency,decimals: (colasany).decimals,},Five of those six keys — format, options, referenceTo, currency, decimals — are read off the AUTHORED column and are declared by neither TableColumn (packages/types/src/data-display.ts:293) nor its TableColumnSchema mirror. Three are reached through (col as any), which is the same "declared != enforced" tell #5853 removed for type.
This is not a dormant limb. packages/plugin-dashboard/src/__tests__/ObjectDataTable.cells.test.tsx exercises it directly:
constschema: any={type: 'object-data-table',objectName: 'opportunity',columns: [{header: 'Amount',accessorKey: 'amount',format: '$0,0'},{header: 'Probability',accessorKey: 'probability',format: '0%'},],};and asserts $150,000 / 60% render. Note the : any on the schema — that annotation is what lets the undeclared key past tsc in the test itself.
Why it matters
The widget honours an authoring vocabulary the published types refuse. A TypeScript author who writes the tested spelling gets a compile error; TableColumnSchema.parse strips the key without a word; and a JSON author gets working behaviour that no declaration promises and no validator protects — so a typo (decimal for decimals, precision for scale) is silently inert rather than a loud parse failure. That lenient face is precisely where AI-authored metadata errors hide and spread.
Suggested disposition
Declare-or-retire per ADR-0049, adjudicated per key rather than as a batch, using the rule stated in #6373's PR body — with the direction reversed, because unlike the six retired writes these five have a real consumer:
- Declare the ones with a genuine authoring story (
format is tested and documented behaviour) on TableColumn + the zod mirror, dropping the as any. - Retire any that only ever mattered as a schema-derived value, in which case the object schema is the single source and the column-level override goes.
Sizing note: this touches the published @object-ui/types surface and needs the zod-mirror-parity pairing plus a changeset, so it is not a one-line annotation.
Related
Generated by Claude Code
Generated by Claude Code
Found while implementing #6373 (retiring the six
FieldMetakeysObjectDataTable.enrich()wrote into theTableColumn[]slot). Filed unassigned. #6373's fence is the WRITE; this is the same seam's READ, and it is a different adjudication — retiring an inert write costs nothing, while these keys are load-bearing.Measured (at
9602dc820)packages/plugin-dashboard/src/ObjectDataTable.tsx, insideenrich(), the overrides handed tobuildFieldMeta:Five of those six keys —
format,options,referenceTo,currency,decimals— are read off the AUTHORED column and are declared by neitherTableColumn(packages/types/src/data-display.ts:293) nor itsTableColumnSchemamirror. Three are reached through(col as any), which is the same "declared != enforced" tell #5853 removed fortype.This is not a dormant limb.
packages/plugin-dashboard/src/__tests__/ObjectDataTable.cells.test.tsxexercises it directly:and asserts
$150,000/60%render. Note the: anyon the schema — that annotation is what lets the undeclared key pasttscin the test itself.Why it matters
The widget honours an authoring vocabulary the published types refuse. A TypeScript author who writes the tested spelling gets a compile error;
TableColumnSchema.parsestrips the key without a word; and a JSON author gets working behaviour that no declaration promises and no validator protects — so a typo (decimalfordecimals,precisionforscale) is silently inert rather than a loud parse failure. That lenient face is precisely where AI-authored metadata errors hide and spread.Suggested disposition
Declare-or-retire per ADR-0049, adjudicated per key rather than as a batch, using the rule stated in #6373's PR body — with the direction reversed, because unlike the six retired writes these five have a real consumer:
formatis tested and documented behaviour) onTableColumn+ the zod mirror, dropping theas any.Sizing note: this touches the published
@object-ui/typessurface and needs thezod-mirror-paritypairing plus a changeset, so it is not a one-line annotation.Related
generateColumns()is untyped (any[]), so nothing type-checks what it writes intoDataTableSchema.columns: TableColumn[]— the hole that hid #5853 and #5453 #6004 — the same untyped-boundary class atObjectGrid.generateColumns()TableColumn.typedisagrees three ways — interface declares 8 literals, zod mirror accepts any string, renderer's live read set handles values outside the union via anas anycast #5853 —type, the one member of this override set already adjudicatedDashboardWidgetSchemaSILENTLY DROPS every undeclared widget key — the file's own docstring names this failure mode, and it still applies to the keys nothing declares #6002 —DashboardWidgetSchemasilently dropping undeclared keys, the same silence one layer upGenerated by Claude Code
Generated by Claude Code