mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
The DAY tier is not recomputed on every path that removes readings: a hard delete with no rollup recompute leaves a bucket counting readings that are gone, and the extremes then repeated it. Those figures are what the Coach snapshot checks its coarse history against, so they must stay true to the live record. A type is now folded from the tier only when the tier accounts for the live record day by day: the same days, and per day the same reading count. The live side is a count per day served by an index-only scan of the live index, so the check reads no measurement rows. A type that fails it is read raw, as before.