chore(showcase): seed Field Zoo with all field types + guard budget hook#2005
Merged
Conversation
The Field Zoo declared all 48 field types but shipped NO seed data, so no field type was ever exercised with a real value — which is exactly why the array-serialization and Field.time bugs (fixed in #2004) went unnoticed. - Seed two field-zoo specimens ("Full" + "Minimal") covering every input-able field type with real values: arrays (multiselect/checkboxes/tags/repeater/ vector), objects (composite/address/location/json/record), time (14:30 / 09:05:30), relational (lookup→Account, master_detail→Project by externalId), and computed (formula=315, autonumber). `f_secret` is intentionally omitted — the seed path has no CryptoProvider so a secret value is refused fail-closed. This doubles as a runtime regression guard: a field type that can't persist now fails the boot seed instead of shipping silently. - Guard the showcase_warn_over_budget hook condition with has() — a partial rollup update (task_count recompute) fires afterUpdate with a record lacking spent/budget, and CEL throws "No such key" on a bare record.spent. has() is the missing-key-safe macro; the noisy warning is gone. Verified live: both specimens seed (37 populated f_* fields on Full); coverage test 20 green; warn_over_budget "No such key" warnings = 0 after a task update. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Completes the showcase capability-coverage gap found while driving it end-to-end. The Field Zoo declared all 48 field types but shipped no seed data — so no field type was ever exercised with a real value, which is exactly why the array-serialization and
Field.timebugs (fixed in #2004) went unnoticed for so long.Changes
Seed two Field Zoo specimens ("Full" + "Minimal") covering every input-able field type with real values:
multiselect/checkboxes/tags/repeater/vectorcomposite/address/location/json/recordtime—14:30/09:05:30lookup → Account,master_detail → Project(by seed externalId)formula(= 315),autonumber(=0001)f_secretis intentionally omitted: the seed path has noCryptoProvider, so a secret value is correctly refused fail-closed.This doubles as a runtime regression guard — a field type that can't persist now fails the boot seed instead of shipping silently green.
Guard
showcase_warn_over_budgetwithhas(). A partial rollup update (thetask_countrecompute) fires the projectafterUpdatewith a record lackingspent/budget, and CEL throws "No such key" on a barerecord.spent.has()is the missing-key-safe macro; the noisy warning is gone. (Hook object-scoping itself was fine — verified.)Verification
f_*fields —f_time='14:30',f_multiselect=['red','green'],f_repeater=[{…},{…}],f_vector=[…],f_lookup/f_master_detailresolved to IDs,f_formula=315,f_autonumber='0001'.warn_over_budget"No such key" warnings = 0.Depends on #2004 (merged) for the array/time persistence — without it the Full specimen's array/time fields would fail to seed.
🤖 Generated with Claude Code