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
{{ message }}
Repository navigation
Verify types–schema parity as an adr.accept gate #768
Two type–schema parity breaks shipped undetected and were found by a downstream consumer (recorded in ADR-105):
JSON Schema definitions missing the required members their TypeScript types declare non-optional (EnumProp, SlotProp), which broke the discrimination AnyProp's oneOf depends on
a oneOf union whose branches overlap by type extension (ImageBinding extends PropBinding in PropConfigurationValue), which oneOf rejects by definition
The constitution names type–schema parity as a gate, but nothing compares the types and the JSON Schema automatically — divergence surfaces in consumers.
Potential solution(s)
An automated parity check that derives each schema definition's required set from the types (or asserts the two against each other) and flags oneOf unions whose branches overlap by extension, run as one of the /specs.adr.accept gates and in CI.
Acceptance criteria
The accept gates fail on a required-set divergence between a type and its schema definition
The accept gates fail when an extension-overlapping union compiles to oneOf
Both ADR-105 defect patterns are covered as regressions
Case data
Territory: schema
Size: m
Notes
ADR-105 (Type–Schema Parity for Overlapping Prop Unions) records both defect instances and the principle the check enforces.
Activity