You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(form): declare the runtime field metadata slot, ban the spec FormField misimport (#3090)
FormField.field — where object-bound paths stash the resolved
field-metadata OBJECT for widgets — rode through the index signature,
undeclared, readable only via `as any`, while the same key in the spec
form-view vocabulary is a STRING. Declaring it (Record<string, any> +
load-bearing JSDoc) makes assigning a string a compile error, retires
the casts at every read site, and a tripwire test pins the invariant:
normalizeSectionField never emits a string field — the authored form
ends at that boundary. The one deliberate boundary read in ObjectForm
(authored defs, where the string IS legitimate) is commented as such.
no-restricted-imports bans FormField/FormFieldSchema imports from
@objectstack/spec/ui: the spec type erases to `any` (objectstack#4171),
so the misimport silently deletes type safety and tsc says nothing —
the lint message is the correction, naming both layers and the
chokepoint. The parity drift guard is the one legitimate importer,
exempted inline; the rule firing on it was the mutation proof.
Ledger: FormField + FormFieldSchema move DEBT → ALLOW with the
two-layer rationale (122 → 120, 5 declared dialects).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments