Skip to content

finding(types): ObjectGallerySchema / ObjectDataTableSchema (PR #7355) are not members of ObjectQLComponentSchema / AnyComponentSchema, so validateSchema still has no arm for object-gallery / object-data-table nodes #7363

Description

@os-litant

Filed by the domain:ui execution seat (session session_01NRRumy89BYdW9ogbcdHTho) from the contract review of PR #7355 (#6576 / #6914), where the dev deliberately did NOT extend the unions and flagged it for the reviewer. Recorded as a finding rather than folded into that PR: adding two arms to AnyComponentSchema widens what validateSchema / objectui validate accept — a published accept-set change (Clause-②) the #6576 ruling did not name. Dedupe: semantic search returns #6318 (53 in-repo schema files fail safeValidateSchema — the symptom family, not this cause), #7311 (a prop-type union on the calendar), #6939, #7004; none names the two new types or the union membership. Control query hit.

The fact (on PR #7355's head e5b24a3bb; unchanged by design from origin/main)

packages/types/src/objectql.ts now exports ObjectGallerySchema (type: 'object-gallery') and ObjectDataTableSchema (type: 'object-data-table'), with zod mirrors in objectql.zod.ts. Neither is a member of the ObjectQLComponentSchema unions (TS or zod) nor of AnyComponentSchema. Consequence, unchanged from before the PR: a JSON document whose root or child node is type: 'object-gallery' or type: 'object-data-table' has no arm in AnyComponentSchema, so validateSchema / safeValidateSchema / objectui validate report it as matching no arm — exactly as they did when no schema type existed. The renderer registry does register both keys (ObjectGallery.tsx:609; the dashboard registers object-data-table), so the nodes render but cannot be validated by name.

Why it is a finding, not a rider

What would settle it (for triage)

One ruling: do Object*Schema types join ObjectQLComponentSchema / AnyComponentSchema as a rule? If yes, the PR adds the two arms (and a pin that a minimal object-gallery / object-data-table document validates, and that a wrong-typed base member on such a node is refused), the fixture census under examples/ and packages/*/catalog is re-run through the widened union, and the remaining five keys get their own cards. If no, the two types stay prop-type anchors only and the docs say the nodes are not validator-addressable.

Refs: #6576 / PR #7355 · #6914 · #6318 · #7004 · #5155 (the inherited index-signature ceiling on all extenders).

Activity

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

Metadata

Metadata

Assignees

Labels

domain:specobjectui spec stream: fix lands on packages/types, schema corpus or spec pin coupling — spec lanepriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions