From 1aab3bf4e868df4682a0e2da5fb2a86be3a7afb9 Mon Sep 17 00:00:00 2001 From: Flea Flicker Date: Sat, 30 May 2026 04:40:08 +0000 Subject: [PATCH] GRO-1955: remove broken uc.petName refs in random pet batch medicalAlerts IIFE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The uc reference in the random pet batch (lines 970/973) is a regression from GRO-1949 — uc is only defined in the UAT client loop context (line 1056), not in the surrounding random pet generation loop. Deterministic UAT pet alerts are already correctly implemented in the uatClients loop (lines 1073-1078) where uc is in scope. This removes the undefined uc references from the random batch IIFE, restoring typecheck compliance. The deterministic UAT seeding for TestCooper/TestRocky remains intact in the uAT client loop. --- packages/db/src/seed.ts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/packages/db/src/seed.ts b/packages/db/src/seed.ts index 985ecf0..0264c19 100644 --- a/packages/db/src/seed.ts +++ b/packages/db/src/seed.ts @@ -966,14 +966,6 @@ 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() })); @@ -1101,14 +1093,6 @@ 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() }));