Seeding
Synthetic generation is deterministic and writes through the normal review append store. It is development/test data, including workflow states that cannot yet be reached through live routing.
Commands and defaults
bun run scripts/seed-snap-negative.ts --help bun run scripts/seed-snap-negative.ts --no-reset --dry-run bun run scripts/seed-snap-negative.ts --no-reset # Preview four full FFYs (no database connection or file writes): bun run db:seed --ffy-from 2023 --ffy-to 2026 --dry-run
CLI defaults are September 2026, seed 42, and 50 closed/suspended plus 50 rejected reviews
per month: 100 in one month, 1,200 in a full FFY. Default workflow reference time is noon
UTC on the last sample-month day. --as-of YYYY-MM-DD fixes it explicitly.
Some test helpers supply their own fixed baseline date; do not assume every fixture uses
the CLI default.
Identity and repeatability
Review numbers restart by FFY. fixtureReviewKey uses UUIDv5 from a fixed
namespace and SNAP business identity. The numeric random seed affects contents, not the
UUID. Keep seed, month range, and as-of fixed to reproduce contents. Migration-assigned
existing IDs need not equal fixture UUIDs. Non-reset seeding matches existing business
identities so it can skip migrated rows too.
Writes and reset
bun run db:seed and db:seed:prod include --reset.
Reset deletes snapshots, index, events, visits, and touches for all programs in the
selected database; policy tables remain. Generation checks policy conflicts before
resetting. Policy inserts, the reset and all review rows run in one transaction over a
direct pg connection, so an interrupted seed leaves the database unchanged.
Production writes also need --confirm-production.
Without reset, matching business identities at the same sample month are skipped. Month
collisions or --force collisions fail preflight. Published tables with
matching identity/month but different contents are refused.
--fixtures optionally writes attested BIS text; --dry-run never
connects or writes files.
Fixture scope
Seed helpers create scenario, approval, memo, and release examples directly; they are not evidence that a user can currently traverse every state. Other FFY amount tables are labeled synthetic copies. Report backfill is a separate command; it recomputes projections without reseeding reviews.