mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
The score reader's labs query selected referenceLow/referenceHigh on the joined Biomarker, but the catalog's range columns are lowerBound and upperBound. Prisma rejects a select against names a model does not have at query-validation time, before any row is read, so every labs read threw and both the Glycaemia and Lipids pillars reported a failed read permanently, Retry included, even for accounts with valid lab results. Select the real columns, map the catalog bounds onto the reader's range fallback, and pin two contracts: a real-Postgres round trip that scores both pillars through the biomarker join (including a lipid row whose range lives only on the catalog), and the honest empty state, where a labs account with no rows reads as not tracked rather than read_failed, which stays reserved for a read that genuinely failed. Refs #780