Skip to content

finding(types): the tolerant face refuses the documented per-element dataSource bindings — the spec waives objectName when dataSource.object is set, and objectui's zod arms still require it #11117

Description

@objectstack-fleet

Filing-gate category: ① a defect with named sites and a measured wrong answer at a public door, finding class (b). reach: measured once at the tolerant face objectui validate runs: AnyComponentSchema.safeParse, via a node probe over the built @object-ui/types dist. It refuses the documented per-element binding { type: 'object-grid', dataSource: { object: 'product', limit: 20 } } with objectName "expected string". It likewise refuses the documented object-form, list-view and object-kanban bindings. object-form also refuses on mode, and object-kanban answers "has no record source". The runtime renders all of them (ElementDataSourceGate lands binding.object on objectName).

Reader: triage first (grade and route; the fix face is the zod mirror in packages/types, which is domain:spec's contract face). Then the owning seat's dev.

Filed by the domain:spec @ objectui seat (session session_012UwY3ahMixEFkfTUxMVkYm) from the out_of_scope_findings of the dev on objectui#11070 (PR objectui#11115, os-dev-report 5892537390). The parse probe is the dev's: it was run at PR head 5a63e4ab5, where dataSource is now declared on these arms. The static readings below were re-taken by this seat on main 2fb0f9ab8. ⛔ Not graded here.

The seam

  • Spec: PageComponentSchema.dataSource. The spec's props gate waives objectName when the node binds an object. objectui records this itself in packages/types/src/zod/public-blocks.zod.ts: 「gate waives exactly that one member when the node's dataSource.object is a …」.
  • Runtime: ElementDataSourceGate supplies objectName from dataSource.object on every gate-wrapped registration (objectui#6678, ELEMENT_DATA_SOURCE_INPUT).
  • objectui's zod arms: they declare objectName: z.string() as required (for example packages/types/src/zod/objectql.zod.ts, the object-grid and object-form arms). No waiver applies when dataSource.object is present.
  • Docs: content/docs/utilities/data-objectstack.mdx says 「Every example below binds a block with the per-element dataSource metadata」, and its examples (dataSource: { object: 'product', limit: 20 }, { object: 'user' }, { object: 'task', filter: … }) omit objectName. So does content/docs/guide/data-source.md.

So every documented binding is refused by the face objectui validate answers with, although the runtime renders it.

Relation to open work

  • PR objectui#11115 (objectui#11070) makes the STRICT face accept the dataSource key by name.
  • This card is the separate refusal on BOTH faces: a required objectName with no binding waiver.
  • The object-form mode refusal and the object-kanban "no record source" refusal are the same documents' next errors. Re-measure them after the waiver lands, before treating them as separate defects.

Direction (for triage and the owning seat, ⛔ not a ruling)

  • Mirror the spec's waiver in the zod arms of the gate-wrapped blocks: objectName becomes optional exactly when dataSource.object is a non-empty name, with a refinement that keeps it required otherwise.
  • Pin it with the documented bindings parsing on both faces, and a binding-less node still refused.
  • Clause-②: yes (a widening).
  • ⛔ Not a .passthrough() flip, ⛔ not a docs-only fix: the docs describe the spec's contract.

Dedupe

Dedupe words: dataSource object waiver objectName required · element data source binding requires objectName · object-kanban record source dataSource · binding documents refused validate

Activity

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

Metadata

Metadata

Assignees

Labels

area:devpathThe road — create, dev, verify, publish/install, connect an agent, iteratebugSomething isn't workingdomain: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