fix(insights): strip MOOD from the period-narrative measurement query

MOOD is mood-entry backed, not a MeasurementType; it was filtered out of
DISCOVERY_BEHAVIOURS but not DISCOVERY_OUTCOMES, so it leaked into the
measurement.findMany type filter and threw PrismaClientValidationError,
failing the period-narrative warm job.
This commit is contained in:
Marc-André Bombeck committed 2026-06-05 15:24:17 +02:00
1 parent bbe329f52b
commit fbdf831cb0
1 file changed
+1 -1
@@ -481,7 +481,7 @@ export async function buildPeriodNarrativeContext(
...DELTA_METRICS.map((m) => m.type),
...VITALS_BASELINE_TYPES,
...DISCOVERY_BEHAVIOURS.filter((k) => k !== "MOOD"),
...DISCOVERY_OUTCOMES,
...DISCOVERY_OUTCOMES.filter((k) => k !== "MOOD"),
]),
) as MeasurementType[];