Summary
packages/fields/src/__tests__/LocationField.optionalKeys.test.tsx pins, by name, that @objectstack/spec's LocationValueSchema is not strict ("pins WHY those assertions read keys and not safeParse: the schema is not strict" — LOCATION_SCHEMA.safeParse(polluted).success === true for { lat, lng, latitude, longitude }), and packages/fields/src/widgets/LocationField.tsx carries the matching comment ("LocationValueSchema is a plain, NON-STRICT z.object, so it ACCEPTS a polluted object and merely strips the unknown keys"). Measured at the pin d8ec8d6d4f011b11c8eb1e6dbd364ef206711391 (objectstack .objectui-sha), lines 217–224 of the test and ~125 of the widget.
objectstack#13802 (maintainer ruling 2026-09-01, option A) makes LocationValueSchema and AddressSchemastrict: an undeclared key is refused by name (unrecognized_keys, with a rename latitude → lat, longitude → lng, postal_code / zipCode → postalCode). The day this repo takes a @objectstack/spec release carrying that change (it ships as a minor under the launch-window convention, protocol major 18, D3 entry address-location-value-unknown-keys-refused), that pin goes red — correctly — and the comment becomes false.
What does NOT move
Measured at the pin: LocationField.tsx's two runtime safeParse sites (isSpecAcceptedLocation, refusedRangeMessage) only ever parse a widget-built { lat, lng, altitude?, accuracy? } candidate (a key-by-key pick, deliberately not a spread), so their verdicts do not change under the strict schema. AddressField parses nothing at runtime; its AddressField.postalCode.test.tsx parses only the widget's own output, which never carries zipCode. The READ guard isLocationValue is hand-written and unaffected — legacy values still render.
Expected fix (when the spec bump lands)
- Repin
LocationField.optionalKeys.test.tsx's last test to the strict contract: safeParse(polluted).success === false with the unrecognized_keys issue naming latitude / longitude — the reason the widget reads emitted keys rather than safeParse is now the OPPOSITE one (the spec IS the guard), so the test's prose flips with the assertion. - Update the
carryOptionalKeys comment in LocationField.tsx accordingly (the key-by-key pick stays — it is still the right shape; only the "the spec cannot be that guard" sentence is stale).
⛔ No consumer-side alias for postal_code / zipCode / latitude follows from this (AGENTS.md #0.1; objectstack#13802's ruling item 5) — the widget's existing read-time LegacyAddressValue display compatibility is untouched by the spec change and is not what this issue is about.
Blocked-by: objectstack-ai/objectstack#13802 (its PR must land and a @objectstack/spec release carrying it must be taken here first).
Related: objectstack#13388, objectstack#5143, objectui#6812, objectui#6664.
Generated by Claude Code
Generated by Claude Code
Summary
packages/fields/src/__tests__/LocationField.optionalKeys.test.tsxpins, by name, that@objectstack/spec'sLocationValueSchemais not strict ("pins WHY those assertions read keys and not safeParse: the schema is not strict" —LOCATION_SCHEMA.safeParse(polluted).success === truefor{ lat, lng, latitude, longitude }), andpackages/fields/src/widgets/LocationField.tsxcarries the matching comment ("LocationValueSchemais a plain, NON-STRICTz.object, so it ACCEPTS a polluted object and merely strips the unknown keys"). Measured at the pind8ec8d6d4f011b11c8eb1e6dbd364ef206711391(objectstack.objectui-sha), lines 217–224 of the test and ~125 of the widget.objectstack#13802 (maintainer ruling 2026-09-01, option A) makes
LocationValueSchemaandAddressSchemastrict: an undeclared key is refused by name (unrecognized_keys, with a renamelatitude→lat,longitude→lng,postal_code/zipCode→postalCode). The day this repo takes a@objectstack/specrelease carrying that change (it ships as aminorunder the launch-window convention, protocol major 18, D3 entryaddress-location-value-unknown-keys-refused), that pin goes red — correctly — and the comment becomes false.What does NOT move
Measured at the pin:
LocationField.tsx's two runtimesafeParsesites (isSpecAcceptedLocation,refusedRangeMessage) only ever parse a widget-built{ lat, lng, altitude?, accuracy? }candidate (a key-by-key pick, deliberately not a spread), so their verdicts do not change under the strict schema.AddressFieldparses nothing at runtime; itsAddressField.postalCode.test.tsxparses only the widget's own output, which never carrieszipCode. The READ guardisLocationValueis hand-written and unaffected — legacy values still render.Expected fix (when the spec bump lands)
LocationField.optionalKeys.test.tsx's last test to the strict contract:safeParse(polluted).success === falsewith theunrecognized_keysissue naminglatitude/longitude— the reason the widget reads emitted keys rather thansafeParseis now the OPPOSITE one (the spec IS the guard), so the test's prose flips with the assertion.carryOptionalKeyscomment inLocationField.tsxaccordingly (the key-by-key pick stays — it is still the right shape; only the "the spec cannot be that guard" sentence is stale).⛔ No consumer-side alias for
postal_code/zipCode/latitudefollows from this (AGENTS.md #0.1; objectstack#13802's ruling item 5) — the widget's existing read-timeLegacyAddressValuedisplay compatibility is untouched by the spec change and is not what this issue is about.Blocked-by: objectstack-ai/objectstack#13802 (its PR must land and a
@objectstack/specrelease carrying it must be taken here first).Related: objectstack#13388, objectstack#5143, objectui#6812, objectui#6664.
Generated by Claude Code
Generated by Claude Code