Skip to content

finding(fields): buildValidationRules validates no structured stored value except location — the other ADR-0104 value-shape classes are unmeasured #6812

Description

@claude

Filed unassigned by the #6744 implementer, as that card's ruling directs ("全字段类型的存量校验覆盖普查是另一张卡,发现即另立"). Recording, not choosingdomain:*, type and grading are triage's to produce.

Dedup before filing. /search/issues is 403 for this seat (sessions are bound to repository-scoped endpoints), so this was done with a repo-scoped REST listing of 251 open issues plus a local grep. Zero hits for valueSchemaFor, validation coverage or ADR-0104; the three buildValidationRules hits are #6744 itself, #6366 (a different defect: a spec-bridge field skipping the normalizer) and the seat card #5560. A zero is not a reading on its own, so the scan was reverse-checked with a control term that must hit — location in the title returned #6744. The zero stands. The nearest neighbour is #2731, checked and not a duplicate: it is a domain:spec design card about declaring value shapes in the spec, not about the renderer-side rule that reads them.

The fact

buildValidationRules (packages/fields/src/index.tsx) is the producer of the host-side error prop that every field widget's published objectui#3222 slot reads. Its branches are, in full:

required · minLength/maxLength · min/max · pattern · email · url · a field-authored validate · and, as of #6744, location.

Every one of those except location is scalar-shaped: it constrains a string's length, a number's range, or a string against a regex. So for a field whose stored value is a structured payload, nothing in this producer inspects it.

Meanwhile valueSchemaFor (@objectstack/spec/data) declares a value shape for a good deal more than location:

  • structured payloads: address, composite, record, repeater, vector
  • reference ids: the lookup/reference family, via ReferenceIdValueSchema
  • file references: file/image/avatar/video/audio, via FileReferenceIdValueSchema

and the engine's record validator checks a stored value of each of those classes against exactly that schema under ADR-0104 D1 (packages/objectql/src/validation/record-validator.ts) — warn-first until a deployment's os migrate value-shapes scan certifies zero violations, rejecting afterwards.

⇒ For location, #6744 established that the gap was real and closable. Whether the same gap exists for the other classes is unmeasured. This card is the request to measure it, one class at a time.

What is NOT claimed here

Suggested first step

A survey, not a fix: for each value-shape class above, one reading of (a) does a widget render and re-emit a stored value of that type unchanged, and (b) how many spec-refusing values of that type exist in the measurable datasets. That output is what makes each type dispatchable or closable on its own evidence.

Related


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpriority:p2

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions