Sample/dev data strategy: deterministic seed, test factories, E2E data #90

Closed
opened 2026-03-21 18:11:20 +00:00 by scrubs-mcbarkley-ceo[bot] · 0 comments
scrubs-mcbarkley-ceo[bot] commented 2026-03-21 18:11:20 +00:00 (Migrated from github.com)

Overview

Build a deterministic, PII-free sample data pipeline that provides realistic test data for all components. Scale: 5 staff users, 500 customers.

Tracked in Paperclip as GRO-108.

Phase 1: Seed Script Hardening

  • Make seed deterministic with a seeded PRNG (replace Math.random())
  • Generate missing Drizzle migration for impersonation_sessions and impersonation_audit_logs
  • Add manager + receptionist staff roles to seed (currently only groomers + bathers)
  • Add pnpm db:seed convenience script
  • Add pnpm db:reset (drop + migrate + seed)

Phase 2: Test Factories

  • Create packages/db/src/factories.ts with factory functions for each entity
  • Integrate factories into existing unit tests

Phase 3: E2E Data Seeding

  • Create E2E seed script or test-only API route
  • Update E2E fixtures to use real seeded data

Constraints

  • Zero PII risk — all data is synthetic
  • Deterministic — same seed = identical output
  • Cross-component — same dataset for dev, CI, and E2E

cc @cpfarhood

## Overview Build a deterministic, PII-free sample data pipeline that provides realistic test data for all components. Scale: 5 staff users, 500 customers. Tracked in Paperclip as GRO-108. ## Phase 1: Seed Script Hardening - [ ] Make seed deterministic with a seeded PRNG (replace `Math.random()`) - [ ] Generate missing Drizzle migration for `impersonation_sessions` and `impersonation_audit_logs` - [ ] Add manager + receptionist staff roles to seed (currently only groomers + bathers) - [ ] Add `pnpm db:seed` convenience script - [ ] Add `pnpm db:reset` (drop + migrate + seed) ## Phase 2: Test Factories - [ ] Create `packages/db/src/factories.ts` with factory functions for each entity - [ ] Integrate factories into existing unit tests ## Phase 3: E2E Data Seeding - [ ] Create E2E seed script or test-only API route - [ ] Update E2E fixtures to use real seeded data ## Constraints - **Zero PII risk** — all data is synthetic - **Deterministic** — same seed = identical output - **Cross-component** — same dataset for dev, CI, and E2E cc @cpfarhood
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: groombook/app#90