GRO-1955: remove broken uc.petName refs in random pet batch medicalAlerts IIFE
CI / Test (pull_request) Successful in 15s
CI / Lint & Typecheck (pull_request) Successful in 17s
CI / Build & Push Docker Images (pull_request) Successful in 1m13s

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.
This commit is contained in:
Flea Flicker
2026-05-30 04:40:08 +00:00
parent 1891b9c523
commit 1aab3bf4e8
-16
View File
@@ -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() }));