Skip to content

test(dogfood): complete field-zoo round-trip matrix over every existing field type#2033

Merged
os-zhuang merged 1 commit into
mainfrom
fix/field-zoo-full-coverage
Jun 18, 2026
Merged

test(dogfood): complete field-zoo round-trip matrix over every existing field type#2033
os-zhuang merged 1 commit into
mainfrom
fix/field-zoo-full-coverage

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Follow-up to #2025 / #2028. The user's steer: adding new field types is an extreme case — first make sure the existing field types are OK.

The dogfood field-zoo matrix covered ~26 of field-zoo's ~47 types; the rest were only static-registered (the bundle loads them) but never written and read back over the real stack. This closes that gap.

Result

No source change was needed — every newly-covered existing type already round-trips correctly. That's the point: this locks the existing field-type surface in as a runtime regression gate. (The only real leaks — rating/slider/toggle/progress — were already fixed in #2025/#2028.)

Added coverage

  • text family: markdown, html, richtext, code, signature, qrcode
  • temporal: datetime — exact instant preserved (2024-03-15T14:30:00.000Z round-trips verbatim)
  • structured JSON: vector, composite, repeater, location, address, image, file, avatar
  • relational: lookup, master_detail, tree — value fidelity (id string round-trips). FK enforcement is off in this harness, so this asserts the stored type doesn't drift, not referential integrity / $expand (covered elsewhere).
  • security: secret (encrypt-on-write, masked to SECRET_MASK on read — verified plaintext never echoes back over HTTP), password (persists; the generic CRUD path stores it opaquely, auth owns hashing).

f_summary is intentionally excluded (computed roll-up, null on a childless fixture row — covered by dedicated roll-up tests).

Verification

Dogfood field-zoo HTTP round-trip: 46 passed (was 22 at #2022).

⚠️ Surfaced while writing this: a password-typed field on a non-auth object (like field-zoo) is stored opaquely by the generic path but is not hashed or masked the way secret is — worth a separate look at whether password outside the auth subsystem should mask-on-read like secret. Not addressed here.

🤖 Generated with Claude Code

…isting field type

The matrix covered ~26 of field-zoo's ~47 types; this closes the gap so
every existing authorable field type has a real HTTP round-trip proof,
not just a static registration. No source change was needed — all the
newly covered types already round-trip correctly, which is the point:
this locks the existing surface in as a regression gate.

Added coverage:
- text family: markdown, html, richtext, code, signature, qrcode
- temporal: datetime (instant preserved exactly)
- structured JSON: vector, composite, repeater, location, address,
  image, file, avatar
- relational: lookup, master_detail, tree (value fidelity — id string
  round-trips; FK/$expand covered elsewhere)
- security: secret (encrypt-on-write, masked to SECRET_MASK on read),
  password (persists; generic path is opaque, auth owns hashing)

f_summary is intentionally excluded (computed roll-up, null on a
childless fixture row).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 18, 2026 12:30pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

No hand-written docs reference the 1 changed package(s). ✅

@os-zhuang
os-zhuang merged commit c557f93 into main Jun 18, 2026
16 checks passed
@os-zhuang
os-zhuang deleted the fix/field-zoo-full-coverage branch June 18, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant