Skip to content

fix(examples): correct f_address seed key to postalCode - #14090

Merged
os-support-ai merged 1 commit into
mainfrom
claude/issue-13388-showcase-seed-postalcode
Sep 1, 2026
Merged

fix(examples): correct f_address seed key to postalCode#14090
os-support-ai merged 1 commit into
mainfrom
claude/issue-13388-showcase-seed-postalcode

Conversation

@os-support-ai

Copy link
Copy Markdown
Collaborator

Fixes #13388

What

examples/app-showcase/src/data/seed/index.ts seeded the field-zoo specimen's
f_address value with postal_code, a key AddressSchema
(packages/spec/src/data/field-value.zod.ts) does not declare — the schema
declares camelCase postalCode. One key, one line:

- f_address: { street: '1 Main St', city: 'Seattle', state: 'WA', postal_code: '98101', country: 'US' },
+ f_address: { street: '1 Main St', city: 'Seattle', state: 'WA', postalCode: '98101', country: 'US' },

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/spec dist:

OLD (postal_code): { success: true, data: { street: '1 Main St', city: 'Seattle', state: 'WA', country: 'US' } }
                                                                                    ^ postalCode silently stripped
NEW (postalCode):  { success: true, data: { street: '1 Main St', city: 'Seattle', state: 'WA', postalCode: '98101', country: 'US' } }
                                                                                    ^ retained

Fixture sweep

Repo-wide grep for postal_code, 98101, f_address found no fixture or test
pinning the old (wrong) seed value:

No fixture needed updating.

Out of scope (per the card's explicit ⛔s)

Tests

  • pnpm --filter '@objectstack/example-showcase' exec vitest run — 26 test
    files, 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_zoo
    seeded without error.
  • Local gates derived from the diff via 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-loads needs a full-tree pnpm build, which is CI's
    Build Core job).

Changeset

None — examples/app-showcase is "private": true and releases nothing;
skip-changeset label applied per repo convention (pr-automation.yml's
"releases nothing (… examples/ …)" route).


Generated by Claude Code

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 os-support-ai added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 1, 2026 — with Claude
@os-support-ai
os-support-ai marked this pull request as ready for review September 1, 2026 04:45
@os-support-ai
os-support-ai added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit 4bf15db Sep 1, 2026
36 checks passed
@os-support-ai
os-support-ai deleted the claude/issue-13388-showcase-seed-postalcode branch September 1, 2026 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants