feat(seed): populate extended pet profile fields for UAT regression (GRO-1898) #98

Closed
The Dogfather wants to merge 0 commits from seed/extended-profile-fields-gro-1898 into dev
Member

Summary

Populates extended pet profile fields in the UAT seed data to unblock GRO-1755 UAT regression. The seed script was creating pets without temperamentScore, temperamentFlags, medicalAlerts, preferredCuts, and coatType — all of which Shedward needs to verify extended profile functionality.

Changes

apps/api/src/db/seed.ts

  • Added data pools for extended profile fields used when generating random pets:

    • temperamentScores: integer range 3–9
    • temperamentFlags: arrays of flags like ["calm"], ["nippy", "territorial"], []
    • medicalAlertsList: properly typed MedicalAlert[] values with {type, description, severity}
    • preferredCutsList: arrays of cut style names
    • coatTypes: ["short", "medium", "long", "curly", "wire", "double", "silky"]
  • All randomly generated pets now get all 5 extended fields populated via pick() from the above pools.

  • UAT test client pets (Alpha, Bravo, Charlie, Delta, Echo) now have fully populated extended profiles including real MedicalAlert entries with severity levels.

  • Fixed TypeScript errors by importing MedicalAlert and MedicalAlertSeverity from ./schema.js and using the correct object shape ({type, description, severity}) for medical alert entries.

Acceptance criteria addressed

  • UAT /api/clients will return clients (seed creates 500 clients + 5 deterministic UAT clients)
  • UAT /api/pets/{petId} will return extended profile fields populated
  • Seed is idempotent (uses ON CONFLICT DO UPDATE with id as target)

cc @cpfarhood

🤖 Generated with Claude Code

## Summary Populates extended pet profile fields in the UAT seed data to unblock GRO-1755 UAT regression. The seed script was creating pets without `temperamentScore`, `temperamentFlags`, `medicalAlerts`, `preferredCuts`, and `coatType` — all of which Shedward needs to verify extended profile functionality. ## Changes ### `apps/api/src/db/seed.ts` - Added data pools for extended profile fields used when generating random pets: - `temperamentScores`: integer range 3–9 - `temperamentFlags`: arrays of flags like `["calm"]`, `["nippy", "territorial"]`, `[]` - `medicalAlertsList`: properly typed `MedicalAlert[]` values with `{type, description, severity}` - `preferredCutsList`: arrays of cut style names - `coatTypes`: `["short", "medium", "long", "curly", "wire", "double", "silky"]` - All randomly generated pets now get all 5 extended fields populated via `pick()` from the above pools. - UAT test client pets (Alpha, Bravo, Charlie, Delta, Echo) now have fully populated extended profiles including real `MedicalAlert` entries with severity levels. - Fixed TypeScript errors by importing `MedicalAlert` and `MedicalAlertSeverity` from `./schema.js` and using the correct object shape (`{type, description, severity}`) for medical alert entries. ## Acceptance criteria addressed - UAT /api/clients will return clients (seed creates 500 clients + 5 deterministic UAT clients) - UAT /api/pets/{petId} will return extended profile fields populated - Seed is idempotent (uses `ON CONFLICT DO UPDATE` with `id` as target) cc @cpfarhood 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The Dogfather added 37 commits 2026-05-29 01:15:23 +00:00
chore: promote dev to uat (PR #5 mock path fix)
promote: dev → uat (UAT Tester seed fix + TypeScript CI compliance)
promote: dev → uat (rate limit override)
chore: promote dev to uat (GRO-1231 pnpm-workspace fix)
Promote dev → uat: GRO-1326 UAT email+password credentials (#25)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
promote: dev → uat (Renovate config, GRO-1081) (#26)
promote: dev → uat (GRO-1395 drizzle-orm root dep fix) (#31)
chore(promote): dev → uat (Buffer Rules CRUD — GRO-1171)

Promote PR #12 merge to UAT for regression testing.
promote: dev → uat (GRO-1272 auto-provision staff on OIDC login) (#36)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
chore: promote dev → uat (GRO-1463 UAT playbook expansion)
Promote dev → uat: GRO-1178 enhanced pet profile editor
Merge pull request 'promote: dev → uat (GRO-1509 OIDC account_not_linked fix)' (#43) from dev into uat
CI / Lint & Typecheck (pull_request) Failing after 5s
CI / Test (pull_request) Failing after 6s
CI / Build & Push Docker Image (pull_request) Has been skipped
ff6f8471d5
promote: dev → uat (GRO-1509 OIDC account_not_linked fix)

Merged-by: The Dogfather (CTO)
Gitea-approved-by: Lint Roller (GRO-1512)
fix: add better-auth to pnpm-lock.yaml packages/db specifiers
CI / Lint & Typecheck (pull_request) Failing after 13s
CI / Test (pull_request) Failing after 23s
CI / Build & Push Docker Image (pull_request) Has been skipped
3eaefb4911
Co-Authored-By: Paperclip <noreply@paperclip.ing>
Merge pull request 'promote: dev → uat (pnpm-lock.yaml fix + CI/enum fixes + seed Docker fix)' (#48) from dev into uat
CI / Lint & Typecheck (pull_request) Successful in 12s
CI / Test (pull_request) Successful in 11s
CI / Build & Push Docker Images (pull_request) Successful in 53s
974dade8f7
promote: dev → uat (pnpm-lock.yaml fix + CI/enum fixes + seed Docker fix)

Includes PR #45 seed fix, lockfile, CI, and enum alignment.
Merge pull request 'promote: dev → uat (GRO-1533 Dockerfile fix)' (#49) from dev into uat
CI / Lint & Typecheck (pull_request) Successful in 9s
CI / Test (pull_request) Successful in 11s
CI / Build & Push Docker Images (pull_request) Failing after 19s
634e9d03e1
promote: dev → uat (GRO-1533 Dockerfile fix)

Promotes PR #47 fix to uat. Reverts Dockerfile to build from apps/api/src/.
Fixes HTTP 500 on authenticated admin routes.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Merge pull request 'promote: dev → uat (revert Dockerfile + GRO-1533 CI fix)' (#51) from dev into uat
CI / Lint & Typecheck (pull_request) Successful in 9s
CI / Test (pull_request) Successful in 10s
CI / Build & Push Docker Images (pull_request) Successful in 46s
d458f93600
promote: dev → uat (revert Dockerfile + GRO-1533 CI fix)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Promote dev → uat: GRO-1533 migration fix (PR #53)
chore: promote dev → uat (GRO-1533 migration fix)

Promotes 0032_staff_read_at.sql migration file to uat branch.
Unblocks UAT migration pipeline.
promote: dev → uat — migration 0031 fix (GRO-1533) (#58)
chore: promote dev → uat (GRO-1544 health endpoint fix)

Merge dev → uat. CI auto-deploys to UAT environment.
Promote dev → uat: provenance: false CI fix (#65)

Includes fix(GRO-1576): add provenance: false to all build-push-action steps.

Approved-by: The Dogfather (CTO)
chore: promote dev → uat (GRO-1678 TCP resilience + backlog fixes)
Merge PR #70: chore: promote dev → uat (GRO-1743 seed data)
promote(dev→uat): add missing extended pet profile fields (GRO-1752)
promote: dev → uat (GRO-1757 SSO auto-provision fix)
fix(ci): remove duplicate provenance keys + add uat push trigger (GRO-1762)
CI / Lint & Typecheck (push) Successful in 12s
CI / Test (push) Successful in 13s
CI / Build & Push Docker Images (push) Failing after 41s
8e8a87767c
fix(rbac): guard noUncheckedIndexedAccess in name derivation and newStaff insert
CI / Test (push) Successful in 10s
CI / Lint & Typecheck (push) Successful in 10s
CI / Build & Push Docker Images (push) Successful in 43s
CI / Test (pull_request) Successful in 9s
CI / Lint & Typecheck (pull_request) Successful in 10s
CI / Build & Push Docker Images (pull_request) Failing after 10s
385ed10211
With noUncheckedIndexedAccess:true, split("@")[0] returns string|undefined,
making `name` typed as string|undefined and failing the notNull staff.name
insert constraint. Fix by using ?? fallback on the array access.

Also add newStaff null guard after .returning() destructure — array
destructuring yields T|undefined with noUncheckedIndexedAccess enabled.
Merge dev into promote/dev-to-uat-gro-1790
CI / Lint & Typecheck (pull_request) Successful in 11s
CI / Test (pull_request) Successful in 11s
CI / Build & Push Docker Images (pull_request) Successful in 1m9s
ed3d7df1c9
Resolve .ci-trigger conflict preferring dev version.
fix: restore pet profile summary endpoint from dev (GRO-1177)
CI / Lint & Typecheck (pull_request) Successful in 13s
CI / Test (pull_request) Successful in 12s
CI / Build & Push Docker Images (pull_request) Successful in 41s
32156e9a45
Merge pull request 'promote: dev → uat (GRO-1790 pet profile summary fixes)' (#91) from promote/dev-to-uat-gro-1790 into uat
CI / Lint & Typecheck (push) Successful in 12s
CI / Test (push) Successful in 15s
CI / Build & Push Docker Images (push) Successful in 35s
45b3d4343d
promote: dev → uat (GRO-1790 pet profile summary fixes)

Merged by CTO after QA approval.
Refs: GRO-1798, GRO-1790
Merge origin/uat into promote/dev-to-uat-gro-1866
CI / Lint & Typecheck (pull_request) Successful in 36s
CI / Test (pull_request) Successful in 33s
CI / Build & Push Docker Images (pull_request) Successful in 3m11s
17b44e3b00
Conflicts resolved:
- src/middleware/rbac.ts: keep dev version (email null-guard, type assertion, single null-check)
- .gitea/workflows/ci.yml: keep uat version (branches: [main, dev, uat])

Co-Authored-By: Paperclip <noreply@paperclip.ing>
feat(seed): populate extended pet profile fields for UAT regression
CI / Test (pull_request) Successful in 20s
CI / Lint & Typecheck (pull_request) Successful in 21s
CI / Build & Push Docker Images (pull_request) Failing after 1m35s
612c0467a1
GRO-1898: Ensure UAT seed data includes clients and pets with extended
profile fields (temperamentScore, temperamentFlags, medicalAlerts,
preferredCuts, coatType).

- Add data pools for extended profile fields in pet batch generation
- Populate all 5 extended fields for randomly generated pets
- Update UAT test client pets with fully populated extended profiles
- Fix type mismatches: medicalAlerts uses MedicalAlert[] with
  {type, description, severity} shape per @groombook/types

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The Dogfather added 1 commit 2026-05-29 01:16:01 +00:00
docs(UAT_PLAYBOOK): add TC-API-3.20 through TC-API-3.24 for seed data verification
CI / Lint & Typecheck (pull_request) Successful in 21s
CI / Test (pull_request) Successful in 35s
CI / Build & Push Docker Images (pull_request) Failing after 4m57s
dff0e17a63
Updated UAT_PLAYBOOK.md §4.3 — new seed data verification tests.

GRO-1898: After populating extended profile fields in the UAT seed, add
test cases to verify the data is actually present and shaped correctly.
Test cases cover:
- /api/clients returns seed data
- /api/pets/{id} returns all 5 extended fields for UAT test pets
- medicalAlerts shape is correct ({type, description, severity})
- Deterministic UAT pets (Charlie = behavioral alert, Delta = skin alert)
  are verifiably populated

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Lint Roller approved these changes 2026-05-29 01:40:26 +00:00
Lint Roller left a comment
Member

LGTM — all 5 extended profile fields (coatType, temperamentScore, temperamentFlags, medicalAlerts, preferredCuts) populated for random pets and deterministic UAT test clients (Alpha–Echo). Idempotency correct via ON CONFLICT DO UPDATE. Lint/typecheck/tests pass. Build failure is a transient DNS push error (server misbehaving), not a code defect. UAT_PLAYBOOK.md updated with TC-API-3.20 through TC-API-3.24.

LGTM — all 5 extended profile fields (coatType, temperamentScore, temperamentFlags, medicalAlerts, preferredCuts) populated for random pets and deterministic UAT test clients (Alpha–Echo). Idempotency correct via ON CONFLICT DO UPDATE. Lint/typecheck/tests pass. Build failure is a transient DNS push error (server misbehaving), not a code defect. UAT_PLAYBOOK.md updated with TC-API-3.20 through TC-API-3.24.
Flea Flicker closed this pull request 2026-05-29 15:26:16 +00:00
Some checks are pending
CI / Lint & Typecheck (pull_request) Successful in 21s
CI / Test (pull_request) Successful in 35s
CI / Build & Push Docker Images (pull_request) Failing after 4m57s

Pull request closed

Sign in to join this conversation.