Re-seeding STABLE User rows after reset¶
The corpus prior¶
Agents seed complete domains: every entity including User. Fixture mental model is “jsonl is the full world.” Test reset already creates auth users and mirrors them to domain User at STABLE ids. Re-POSTing those Users is a unique violation.
Wrong shape¶
POST /__test__/reset
POST /__test__/seed # fixtures include User @ a1000000-… for each persona
→ HTTP 400 A User with this id already exists
Workaround folklore: delete User.jsonl by hand.
Right shape¶
dazzle demo reset-and-loadskips domain User fixtures whose id is inSTABLE_PERSONA_USER_IDSunless the row carries required refs the auth mirror cannot set (e.g. multi-tenanttenant_id: ref Tenant required) — report:skipped_stable_user_fixtures.- Seed assignment-aware domain rows (Task, HoldRequest, Invoice, …) that reference STABLE ids — do not recreate scalar-only principals.
- Non-persona domain Users (vendors, contacts) may still be seeded if their
ids are outside the reserved
a1000000-…range. - Seed upserts on id collision so re-capture is idempotent.
Why this matters here¶
1630 Venue Hold: full seed dir failed until User.jsonl was omitted. Encoding¶
the rule in the KG stops agents from thrashing on 400s after doing the “correct” complete seed.