fix(examples): correct f_address seed key to postalCode - #14090
Merged
Conversation
The showcase field-zoo specimen seeded `postal_code`, a key AddressSchema does not declare (it declares camelCase `postalCode`). The value was silently accepted with the postal code stripped by zod's default unrecognized-key handling, and the objectui field renderer's ZIP box rendered empty since it reads addr.postalCode. Fixes #13388 _Generated by [Claude Code](https://claude.ai/code)_
os-support-ai
marked this pull request as ready for review
September 1, 2026 04:45
os-support-ai
enabled auto-merge
September 1, 2026 04:45
os-support-ai
deleted the
claude/issue-13388-showcase-seed-postalcode
branch
September 1, 2026 05:14
os-zhuang
pushed a commit
that referenced
this pull request
Sep 2, 2026
…3802) Maintainer ruling 2026-09-01 (option A): LocationValueSchema and AddressSchema (= AddressValueSchema) were all-optional stripping z.objects, so a value with a wrong key set parsed green and the wrong keys vanished — the showcase seed's postal_code (#13388) was accepted, dropped and rendered as an empty ZIP box, and a stored-value scan over the class could only report a clean count. Both are strictObject now; FileValueSchema stays the one deliberate looseObject. The refusal names the key and the rename (postal_code/zipCode -> postalCode, latitude/longitude -> lat/lng). Ordered census first: every in-repo corpus that writes address/location values (8459 files, 196,098 leaf literals, 57 shaped literals) carries zero keys outside the declared sets other than batch D's own tolerance pin, which is repinned here — the repair commit the ruling ordered is empty by measurement (#13388's seed fix landed at #14090). Where the refusal bites is ADR-0104's unchanged evidence gate: defaultValue literals and action params reject at authoring; record writes reject only on a deployment that attested adr-0104-value-shapes (or the env opt-in) and stay warn-first elsewhere; os migrate value-shapes now counts the key; no read path parses these shapes. Strictness-ledger triage row re-verdicted open -> authorable with the census and the migration note, the strip-map row dropped (reverse pin), finding 21 added, counts regenerated; D3 semantic entry address-location-value-unknown-keys-refused registered under 18. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GDA48PuRFrHyRfdkBz8m21
This was referenced Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #13388
What
examples/app-showcase/src/data/seed/index.tsseeded thefield-zoospecimen'sf_addressvalue withpostal_code, a keyAddressSchema(
packages/spec/src/data/field-value.zod.ts) does not declare — the schemadeclares camelCase
postalCode. One key, one line:No renderer change and no consumer-side alias — the producer (this seed) was
wrong relative to the contract, and the fix is at the producer per AGENTS.md's
contract-first directive.
Evidence
valueSchemaFor({ type: 'address' }, 'stored').safeParse(...)before/after,built
@objectstack/specdist:Fixture sweep
Repo-wide grep for
postal_code,98101,f_addressfound no fixture or testpinning the old (wrong) seed value:
packages/qa/dogfood/test/field-zoo.matrix.tsasserts its own independentf_addresswrite value ({ street: '1 Main', city: 'SF', country: 'US' }),unrelated to the seed.
packages/spec/src/data/analytics-strictness-batchd.test.tsusesAddressSchemawith its own unrelated fixture (
{ street: '1 Main St', district: 'Central' }) —part of the separate strictness-fork territory (Two structured value classes (
AddressSchema,LocationValueSchema) are all-optional strippingz.objects — a wrong key is accepted and dropped, so a stored-value scan reports a clean count it cannot earn #13802/qa stored-value scans fold strip-mode value classes into a violation count of zero they cannot earn — report them unmeasurable instead #14060), not this seed.postal_codehits in the tree (company.manifest.ts,layout-dsl.mdx,concept.mdx,view.test.ts) are unrelated object fieldnames (snake_case machine names on a different object), not this address
value's key.
No fixture needed updating.
Out of scope (per the card's explicit ⛔s)
@object-ui/fields.AddressSchema/LocationValueSchema— the strict-vs-loosequestion is Two structured value classes (
AddressSchema,LocationValueSchema) are all-optional strippingz.objects — a wrong key is accepted and dropped, so a stored-value scan reports a clean count it cannot earn #13802 (decision box) and the scan-honesty half is qa stored-value scans fold strip-mode value classes into a violation count of zero they cannot earn — report them unmeasurable instead #14060.Tests
pnpm --filter '@objectstack/example-showcase' exec vitest run— 26 testfiles, 364 tests, all passed (includes
test/seed.test.ts).pnpm --filter '@objectstack/example-showcase' run typecheck— clean.pnpm --filter '@objectstack/dogfood' exec vitest run test/field-zoo-roundtrip.dogfood.test.ts test/field-zoo-value-shape.test.ts— 2 test files, 91 tests, all passed. This boots the real showcase stack
(real HTTP round-trip) with the fixed seed — clean boot,
showcase_field_zooseeded without error.
node scripts/pm/dispatch-gates.mjs(16 matched families) — all green; see the dev report comment on the issue
for the full list and the one CI-only exception
(
check:dual-build-cjs-loadsneeds a full-treepnpm build, which is CI'sBuild Corejob).Changeset
None —
examples/app-showcaseis"private": trueand releases nothing;skip-changesetlabel applied per repo convention (pr-automation.yml's"releases nothing (… examples/ …)" route).
Generated by Claude Code