mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
The snapshot's second phase (blood pressure in target, the per-context glucose tiles, the Health Score) waits until weight, both blood-pressure halves and steps have DAY buckets. The fold writes buckets only inside the five-year window, so a type whose every reading is older than that never gets one and the phase stayed null for good. Since the Apple Health import now folds only inside the window too, an account that imported years-old blood pressure or steps and nothing since lost those tiles and its score with no explanation. An uncovered gate type now holds the phase back only when it has a reading inside the window, which is the case the backfill will still reach. The extra query runs on the miss path alone and asks one indexed EXISTS per uncovered type.