Skip to content

test(dogfood): field-type capability-matrix round-trip (#2004 + AI-authoring)#2022

Merged
os-zhuang merged 1 commit into
mainfrom
feat/dogfood-field-zoo
Jun 18, 2026
Merged

test(dogfood): field-type capability-matrix round-trip (#2004 + AI-authoring)#2022
os-zhuang merged 1 commit into
mainfrom
feat/dogfood-field-zoo

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Why

This is a development platform where third parties have an AI author arbitrary metadata. The real runtime risk isn't "a platform change broke the CRM example" — it's "the AI used a valid primitive the examples don't exercise, and it silently breaks at runtime." So the dogfood gate (#2020) has to grow from pinning one curated app into a capability matrix: every authorable primitive gets a runtime round-trip proof.

showcase_field_zoo carries one field of (almost) every protocol FieldType, but until now it was only static-checked — the metadata bundle registers it; nothing ever wrote a record and read it back.

What

First capability-matrix block: write one record covering many field types over the real REST data API, read it back, assert each round-trips with type fidelity.

  • Headliner coverage = the fix: array field types persist + Field.time accepts time-of-day #2004 regressions — array-typed fields (multiselect/checkboxes/tags) and Field.time (time-of-day). All proven to round-trip end-to-end on the in-memory (WASM) driver path that objectstack dev uses for :memory:.
  • Broad matrix across text / numbers / temporal / scalar-select / JSON / color, plus behavioral checks for computed (formula = 31.5) and system (autonumber) fields.

The gate earned its keep on day one

On its first run it surfaced three real type-fidelity gaps: rating/slider/toggle persist but read back as strings ('4'/'25'/'1') while number/currency/percent/boolean round-trip correctly with the same harness. The value isn't lost — the type leaks (schema→column mapping / read coercion doesn't cover these types).

Per dogfood philosophy these are not hidden by coercion — they're quarantined with it.fails, which passes while broken and turns RED the day the gap is fixed, forcing the quarantine to be lifted rather than rotting. Filed as a separate task to fix the mapping/coercion and lift the quarantine.

const runner = c.xfail ? it.fails : it;

Notes

  • Private package — no changeset. 21 passed | 3 expected fail.
  • Driver nuance: the harness uses SqliteWasmDriver(':memory:') (what dev uses for in-memory), so this guards the shared validator + WASM driver array path and complements fix: array field types persist + Field.time accepts time-of-day #2004's driver-sql unit test by covering the integration + a second driver.
  • This is the first slice; full 45-type coverage + flow-node / form-widget / RLS-pattern matrices + a generative pass are roadmap, scoped by a forthcoming ADR (binding policy: every authorable+live primitive must carry a runtime proof).

🤖 Generated with Claude Code

…thoring)

Extends the dogfood gate from "pin one example app" toward the platform's real
risk: third parties have an AI author arbitrary metadata, so every authorable
primitive needs a runtime proof — not a static shape check.

`showcase_field_zoo` carries one field of (almost) every protocol FieldType but
was only static-checked (the bundle registers it). This adds the first
capability-matrix block: write one record covering many field types over the
real REST data API, read it back, assert each round-trips with type fidelity.

- Headliner coverage = the #2004 regressions: array-typed fields
  (multiselect/checkboxes/tags) and Field.time (time-of-day) — all proven to
  round-trip end-to-end on the in-memory (WASM) driver path `objectstack dev`
  uses for :memory:.
- On first run it surfaced three real type-fidelity gaps — rating/slider/toggle
  persist but read back as strings ('4'/'25'/'1') while number/currency/percent/
  boolean round-trip correctly. They are quarantined with `it.fails` (passes
  while broken, turns RED when fixed) rather than hidden by coercion, and filed
  as a separate task.

Private package — no changeset. 21 passed + 3 expected-fail.

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 6:04am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file tests size/m labels Jun 18, 2026
@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 f943f3b into main Jun 18, 2026
16 checks passed
@os-zhuang
os-zhuang deleted the feat/dogfood-field-zoo branch June 18, 2026 06:13
os-zhuang added a commit that referenced this pull request Jun 18, 2026
…2024)

* docs(adr): ADR-0054 prove-it-runs gate for the authorable surface

Extends ADR-0049 (enforce-or-remove) with a third leg. The liveness ledger
(#1919) classifies every authorable property live/experimental/dead, but "live"
means only a static file:line consumer pointer — proof that something reads the
property, not that authoring it produces correct runtime behavior. #2018 (tz
bucketing: live at every layer, broken in integration) and the field-type
fidelity gaps (#2022: rating/slider/toggle read back wrong-typed) fell through
that gap — call it "unproven liveness".

For a platform whose authors are AI emitting metadata across a combinatorial
space the examples never cover, unproven liveness ships silently into
third-party apps. ADR-0054 upgrades a `live` classification to optionally carry a
`proof` — a @objectstack/dogfood test that authors the property against the real
in-process stack and asserts the runtime outcome. Required as a ratchet (not a
retrofit) for a high-risk authorable class on change, and for any property
implicated in a shipped regression (the fix carries its proof). Generative
testing is explicitly deferred (Phase 3, evidence-gated).

Proposed — for architect review.

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

* docs(adr): accept ADR-0054 (prove-it-runs gate)

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

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/m tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant