From cc63299415b96bbc89d64838557ba86c1099904d Mon Sep 17 00:00:00 2001 From: Flea Flicker Date: Sat, 30 May 2026 04:10:55 +0000 Subject: [PATCH] GRO-1949: add behavioral and skin medicalAlertPool types, deterministic seeding for TestCooper/TestRocky - 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 --- packages/db/src/seed.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/packages/db/src/seed.ts b/packages/db/src/seed.ts index 375ffe1..7460870 100644 --- a/packages/db/src/seed.ts +++ b/packages/db/src/seed.ts @@ -270,6 +270,10 @@ const medicalAlertPool: MedicalAlert[] = [ { id: "", type: "other", description: "Seizure history — avoid flashing lights", severity: "high" }, { id: "", type: "other", description: "Luxating patella — short walks only", severity: "medium" }, { id: "", type: "other", description: "Ear infections — dry thoroughly after bath", severity: "low" }, + { id: "", type: "behavioral", description: "Anxiety — calm environment preferred", severity: "medium" }, + { id: "", type: "behavioral", description: "Fear-based aggression — approach with caution", severity: "high" }, + { id: "", type: "skin", description: "Contact dermatitis — avoid harsh chemicals", severity: "medium" }, + { id: "", type: "skin", description: "Hot spots — monitor and report any worsening", severity: "high" }, ]; const preferredCutPool: string[] = [ @@ -962,6 +966,14 @@ async function seed() { temperamentScore: randInt(1, 5), temperamentFlags: pickN(temperamentFlagPool, randInt(1, 3)), medicalAlerts: (() => { + // Deterministic alerts for UAT AC pets + if (uc.petName === "TestCooper") { + return pickN(medicalAlertPool.filter((a) => a.type === "behavioral"), 1).map((a) => ({ ...a, id: uuid() })); + } + if (uc.petName === "TestRocky") { + return pickN(medicalAlertPool.filter((a) => a.type === "skin"), 1).map((a) => ({ ...a, id: uuid() })); + } + // Other UAT pets: random if (rand() < 0.3) { const count = rand() < 0.7 ? 1 : 2; return pickN(medicalAlertPool, count).map((a) => ({ ...a, id: uuid() })); @@ -1058,6 +1070,14 @@ async function seed() { temperamentScore: randInt(1, 5), temperamentFlags: pickN(temperamentFlagPool, randInt(1, 3)), medicalAlerts: (() => { + // Deterministic alerts for UAT AC pets + if (uc.petName === "TestCooper") { + return pickN(medicalAlertPool.filter((a) => a.type === "behavioral"), 1).map((a) => ({ ...a, id: uuid() })); + } + if (uc.petName === "TestRocky") { + return pickN(medicalAlertPool.filter((a) => a.type === "skin"), 1).map((a) => ({ ...a, id: uuid() })); + } + // Other UAT pets: random if (rand() < 0.3) { const count = rand() < 0.7 ? 1 : 2; return pickN(medicalAlertPool, count).map((a) => ({ ...a, id: uuid() })); @@ -1081,6 +1101,14 @@ async function seed() { temperamentScore: randInt(1, 5), temperamentFlags: pickN(temperamentFlagPool, randInt(1, 3)), medicalAlerts: (() => { + // Deterministic alerts for UAT AC pets + if (uc.petName === "TestCooper") { + return pickN(medicalAlertPool.filter((a) => a.type === "behavioral"), 1).map((a) => ({ ...a, id: uuid() })); + } + if (uc.petName === "TestRocky") { + return pickN(medicalAlertPool.filter((a) => a.type === "skin"), 1).map((a) => ({ ...a, id: uuid() })); + } + // Other UAT pets: random if (rand() < 0.3) { const count = rand() < 0.7 ? 1 : 2; return pickN(medicalAlertPool, count).map((a) => ({ ...a, id: uuid() }));