feat(GRO-690): add groomer persona seed support via env vars #303

Merged
groombook-engineer[bot] merged 1 commits from feat/gro-690-groomer-persona-seed into main 2026-04-16 05:11:07 +00:00
groombook-engineer[bot] commented 2026-04-16 05:05:04 +00:00 (Migrated from github.com)

Summary

  • Add SEED_UAT_GROOMER_EMAILS and SEED_UAT_GROOMER_NAMES env vars to seed.ts
  • Supports comma-separated lists (e.g., sam@groombook.dev,sarah@groombook.dev)
  • Creates groomer staff records with email as oidcSub in both SEED_KNOWN_USERS_ONLY=true and full seed modes
  • Idempotent: skips existing records

Test plan

  • Verify seed runs with SEED_UAT_GROOMER_EMAILS=sam@groombook.dev,sarah@groombook.dev and SEED_UAT_GROOMER_NAMES=Sam Rivera,Sarah Chen
  • Confirm groomers have role=groomer, isSuperUser=false, oidcSub=email
  • Confirm works in both SEED_KNOWN_USERS_ONLY=true and full seed modes
  • CI passes

cc @cpfarhood

🤖 Generated with Claude Code

## Summary - Add `SEED_UAT_GROOMER_EMAILS` and `SEED_UAT_GROOMER_NAMES` env vars to seed.ts - Supports comma-separated lists (e.g., `sam@groombook.dev,sarah@groombook.dev`) - Creates groomer staff records with email as oidcSub in both `SEED_KNOWN_USERS_ONLY=true` and full seed modes - Idempotent: skips existing records ## Test plan - [ ] Verify seed runs with `SEED_UAT_GROOMER_EMAILS=sam@groombook.dev,sarah@groombook.dev` and `SEED_UAT_GROOMER_NAMES=Sam Rivera,Sarah Chen` - [ ] Confirm groomers have `role=groomer`, `isSuperUser=false`, `oidcSub=email` - [ ] Confirm works in both `SEED_KNOWN_USERS_ONLY=true` and full seed modes - [ ] CI passes cc @cpfarhood 🤖 Generated with [Claude Code](https://claude.com/claude-code)
lint-roller-qa[bot] (Migrated from github.com) approved these changes 2026-04-16 05:08:20 +00:00
lint-roller-qa[bot] (Migrated from github.com) left a comment

QA Review: APPROVED ✓

All CI checks pass (Lint & Typecheck, Test, E2E Tests, Build).

Reviewed against acceptance criteria:

    • env vars added
  • for each groomer record
  • Both and full seed paths covered
  • Idempotent: existing records skipped in known-users path, in full path
  • Edge cases: for unequal counts, for empty strings
  • PR title and branch match spec

Pass — handing to CTO for review.

## QA Review: APPROVED ✓ All CI checks pass (Lint & Typecheck, Test, E2E Tests, Build). Reviewed against acceptance criteria: - + env vars added - for each groomer record - Both and full seed paths covered - Idempotent: existing records skipped in known-users path, in full path - Edge cases: for unequal counts, for empty strings - PR title and branch match spec Pass — handing to CTO for review.
lint-roller-qa[bot] (Migrated from github.com) approved these changes 2026-04-16 05:08:22 +00:00
lint-roller-qa[bot] (Migrated from github.com) left a comment

QA Review: APPROVED

All CI checks pass (Lint & Typecheck, Test, E2E Tests, Build).

Reviewed packages/db/src/seed.ts against acceptance criteria:

  • SEED_UAT_GROOMER_EMAILS + SEED_UAT_GROOMER_NAMES env vars added
  • oidcSub = email for each groomer record
  • Both SEED_KNOWN_USERS_ONLY=true and full seed paths covered
  • Idempotent: existing records skipped in known-users path, onConflictDoUpdate in full path
  • Edge cases: Math.min for unequal counts, .filter(Boolean) for empty strings
  • PR title and branch match spec

Pass - handing to CTO for review.

## QA Review: APPROVED All CI checks pass (Lint & Typecheck, Test, E2E Tests, Build). Reviewed `packages/db/src/seed.ts` against acceptance criteria: - `SEED_UAT_GROOMER_EMAILS` + `SEED_UAT_GROOMER_NAMES` env vars added - `oidcSub = email` for each groomer record - Both `SEED_KNOWN_USERS_ONLY=true` and full seed paths covered - Idempotent: existing records skipped in known-users path, `onConflictDoUpdate` in full path - Edge cases: `Math.min` for unequal counts, `.filter(Boolean)` for empty strings - PR title and branch match spec Pass - handing to CTO for review.
the-dogfather-cto[bot] (Migrated from github.com) approved these changes 2026-04-16 05:10:32 +00:00
the-dogfather-cto[bot] (Migrated from github.com) left a comment

CTO Approval — reviewed for correctness, architecture, and security.

  • Groomer persona seeding follows existing admin staff pattern in both seedKnownUsers (check-insert) and seed (upsert).
  • Deterministic IDs in the 00000000-0000-0000-0000-00000000000X range won't collide with random UUIDs.
  • isSuperUser: false correctly set. oidcSub: email matches convention.
  • Single-file change, clean and minimal. All CI green, QA approved.
CTO Approval — reviewed for correctness, architecture, and security. - Groomer persona seeding follows existing admin staff pattern in both seedKnownUsers (check-insert) and seed (upsert). - Deterministic IDs in the 00000000-0000-0000-0000-00000000000X range won't collide with random UUIDs. - isSuperUser: false correctly set. oidcSub: email matches convention. - Single-file change, clean and minimal. All CI green, QA approved.
github-actions[bot] commented 2026-04-16 05:10:32 +00:00 (Migrated from github.com)

Deployed to groombook-dev

Images: pr-303
URL: https://dev.groombook.farh.net

Ready for UAT validation.

## Deployed to groombook-dev **Images:** `pr-303` **URL:** https://dev.groombook.farh.net Ready for UAT validation.
This repo is archived. You cannot comment on pull requests.