GRO-1949: add behavioral and skin medicalAlertPool types, deterministic seeding for TestCooper/TestRocky #109

Merged
Scrubs McBarkley merged 6 commits from fleaflicker/gro-medical-alert-types-behavioral-skin into dev 2026-05-30 04:12:06 +00:00

6 Commits

Author SHA1 Message Date
Flea Flicker 558c51b357 fix: correct behavioral alert severity to low (matches TC-API-3.23 expectation)
CI / Test (pull_request) Successful in 12s
CI / Lint & Typecheck (pull_request) Failing after 14s
CI / Build & Push Docker Images (pull_request) Has been skipped
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-30 04:11:24 +00:00
Flea Flicker cc63299415 GRO-1949: add behavioral and skin medicalAlertPool types, deterministic seeding for TestCooper/TestRocky
CI / Test (pull_request) Successful in 11s
CI / Lint & Typecheck (pull_request) Failing after 15s
CI / Build & Push Docker Images (pull_request) Has been skipped
- Extend medicalAlertPool with 4 new entries: 2 behavioral, 2 skin
- Make TestCooper (uat-charlie) get a deterministic behavioral alert
- Make TestRocky (uat-delta) get a deterministic skin alert
- Other UAT pets retain random alert assignment

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-30 04:10:55 +00:00
Flea Flicker 473868579b GRO-1921: seedUatStaffAccounts() shared fn — full UAT seed honors numeric OIDC subs
CI / Test (pull_request) Successful in 12s
CI / Lint & Typecheck (pull_request) Successful in 17s
CI / Build & Push Docker Images (pull_request) Successful in 53s
Extract UAT staff account seeding into a shared async function so it
runs in both seedKnownUsers() and the full seed() UAT branch.

Before this change the full seed() UAT path never created the
deterministic UAT staff (UAT Super/Staff/Groomer) with their numeric
oidcSub values from SEED_UAT_*_OIDC_SUB env vars — seedKnownUsers()
had that logic but was bypassed by SEED_KNOWN_USERS_ONLY=true in the
UAT reset CronJob.

seedUatStaffAccounts() handles:
- UAT Super Staff (SEED_UAT_SUPER_OIDC_SUB)
- UAT Staff Groomer (SEED_UAT_STAFF_OIDC_SUB)
- UAT Groomer Personas (SEED_UAT_GROOMER_EMAILS + _NAMES)
- Better Auth email+password credentials (SEED_UAT_*_PASSWORD)
- UAT Customer client + 2 pets

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-30 03:07:21 +00:00
Flea Flicker 4a0dd5ed2a fix(seed): add uat-customer client record for SSO bridge UAT (GRO-1935)
CI / Test (pull_request) Successful in 14s
CI / Lint & Typecheck (pull_request) Successful in 22s
CI / Build & Push Docker Images (pull_request) Successful in 55s
- Add UAT Customer client row (id: c0000001-0000-0000-0000-000000000001)
  with email uat-customer@groombook.dev in seedKnownUsers()
- Add two UAT Customer pets (UAT Pup Alpha, UAT Pup Beta) with stable IDs
- Add test case covering 201 response with correct clientId/clientName
  for uat-customer SSO bridge flow
- Explicit comment clarifying uat-groomer/uat-super are staff, not clients

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-30 02:52:33 +00:00
Flea Flicker bf064b3ada fix(test): mock db to handle sql count(*) queries and async iteration
CI / Test (pull_request) Successful in 13s
CI / Lint & Typecheck (pull_request) Successful in 16s
CI / Build & Push Docker Images (pull_request) Successful in 1m13s
The petProfileSummary mock's sql tag returned a plain string instead of
a proper Drizzle SQL object, so count(*) queries via .as("count") failed.
Also added Symbol.asyncIterator support for for-await-of patterns used
in the pets router.

Fixes: GRO-1917

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-29 16:34:33 +00:00
Flea Flicker 4df7d96020 fix(seed): use typeof on enum.enumValues for db build
CI / Test (pull_request) Successful in 10s
CI / Lint & Typecheck (pull_request) Successful in 14s
CI / Build & Push Docker Images (pull_request) Successful in 51s
TS2749: enumValues is a value, not a type — wrap with typeof before
indexing.

Also extends Lint & Typecheck CI job to run pnpm --filter @groombook/db
typecheck so this class of error is caught at lint time rather than
Docker build time.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 15:30:52 +00:00