Blocked-by: objectui#4895 (if Option C retires the block family, this dissolves with it — so this card should be judged after that direction is ruled, not before)
Observation-class finding, measured while running the objectui#6935 liveness pass. Filed separately because it has a distinct and much smaller fix than #4895's direction question, and because it survives two of #4895's three options.
The measurement
@object-ui/types publishes two "union of all component schemas" surfaces, one per mirror. They disagree about the block family.
| surface | published as | contains block / block-library / block-editor / block-instance |
|---|
AnySchema (TypeScript) | packages/types/src/index.ts:886, exported via . | no — 97 type literals, none of them block vocabulary |
AnyComponentSchema (Zod) | packages/types/src/zod/index.zod.ts:363, exported via ./zod | yes — BlockComponentSchema is arm 13 of 14 |
Both carry the same doc comment: "Union of all component schemas. Use this for generic component rendering where the type is determined at runtime."
Measured by executing the shipped artifact, not by reading it — import of packages/types/dist/zod/index.zod.js (the file the package's exports map publishes as ./zod) plus safeParse:
AnyComponentSchema parses {type:'block'} => OK
AnyComponentSchema parses {type:'block-library'} => OK
AnyComponentSchema parses {type:'block-editor'} => OK
AnyComponentSchema parses {type:'block-instance'} => OK
AnyComponentSchema parses {type:'objui-phantom-6935'} => REJECTED (negative control)
AnyComponentSchema parses a schema-valid {type:'table'} => OK (positive control)
BlockComponentSchema parses {type:'block'} => OK (arm attribution)
BlockComponentSchema parses {type:'objui-phantom-6935'} => REJECTED
with: "Invalid discriminator value. Expected 'block' | 'block-library' | 'block-editor' | 'block-instance' | 'component'"
The negative control matters: because an unknown discriminant is rejected, the acceptance of block is not the union being trivially permissive — a specific arm claims it. BlockComponentSchema's own error message enumerates the vocabulary it owns.
Why this reads as a defect rather than a quirk
PR #5937 (the ruled Option B on #4895) removed the component-schema framing for this family from the docs. This is the same framing still live in a published runtime validator — the layer an AI agent is most likely to check its generated metadata against.
Concretely: an agent authoring metadata, validating with the published validateSchema / AnyComponentSchema, gets a green light for {type: 'block-library'}. Nothing registers that key (the 659-key registry universe measured on #4895 contains no block/slot key except blockquote), so it renders to OBJUI-001. That is precisely the copy-bait class #4823 and #4895 exist to close, one layer below the docs — and validated-then-broken is a worse failure than never-validated, because the validator's green is what the author trusted.
Deliberately NOT proposing the fix here
Two shapes are available (drop the BlockComponentSchema arm from AnyComponentSchema; or keep it and reconcile AnySchema the other way), and choosing between them is#4895's Option C question. Hence Blocked-by: rather than a recommendation. If Option C retires the family, no separate fix is needed.
Cost note for whoever rules on it
packages/types/src/__tests__/zod-mirror-parity.test.ts pins ten blocks.zod.ts symbols, BlockComponentSchema among them, with the recorded reason "a union OVER the mirrors, not an object of its own — its members are checked individually above". Any change here moves that ledger.
Unassigned — grading and routing are the lane's. ⛔ Nothing was edited and no PR was opened.
Blocked-by: objectui#4895 (if Option C retires the block family, this dissolves with it — so this card should be judged after that direction is ruled, not before)
Observation-class finding, measured while running the objectui#6935 liveness pass. Filed separately because it has a distinct and much smaller fix than #4895's direction question, and because it survives two of #4895's three options.
The measurement
@object-ui/typespublishes two "union of all component schemas" surfaces, one per mirror. They disagree about the block family.block/block-library/block-editor/block-instanceAnySchema(TypeScript)packages/types/src/index.ts:886, exported via.typeliterals, none of them block vocabularyAnyComponentSchema(Zod)packages/types/src/zod/index.zod.ts:363, exported via./zodBlockComponentSchemais arm 13 of 14Both carry the same doc comment: "Union of all component schemas. Use this for generic component rendering where the type is determined at runtime."
Measured by executing the shipped artifact, not by reading it —
importofpackages/types/dist/zod/index.zod.js(the file the package'sexportsmap publishes as./zod) plussafeParse:The negative control matters: because an unknown discriminant is rejected, the acceptance of
blockis not the union being trivially permissive — a specific arm claims it.BlockComponentSchema's own error message enumerates the vocabulary it owns.Why this reads as a defect rather than a quirk
PR #5937 (the ruled Option B on #4895) removed the component-schema framing for this family from the docs. This is the same framing still live in a published runtime validator — the layer an AI agent is most likely to check its generated metadata against.
Concretely: an agent authoring metadata, validating with the published
validateSchema/AnyComponentSchema, gets a green light for{type: 'block-library'}. Nothing registers that key (the 659-key registry universe measured on #4895 contains noblock/slotkey exceptblockquote), so it renders to OBJUI-001. That is precisely the copy-bait class #4823 and #4895 exist to close, one layer below the docs — and validated-then-broken is a worse failure than never-validated, because the validator's green is what the author trusted.Deliberately NOT proposing the fix here
Two shapes are available (drop the
BlockComponentSchemaarm fromAnyComponentSchema; or keep it and reconcileAnySchemathe other way), and choosing between them is#4895's Option C question. HenceBlocked-by:rather than a recommendation. If Option C retires the family, no separate fix is needed.Cost note for whoever rules on it
packages/types/src/__tests__/zod-mirror-parity.test.tspins tenblocks.zod.tssymbols,BlockComponentSchemaamong them, with the recorded reason "a union OVER the mirrors, not an object of its own — its members are checked individually above". Any change here moves that ledger.Unassigned — grading and routing are the lane's. ⛔ Nothing was edited and no PR was opened.