mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
The nightly dense-intraday fold scanned Apple Health rows only, so the per-minute heart rate a Health Connect import writes for the last 90 days never aged into hourly means and every new export added another quarter of raw samples. The fold now walks each fold source in turn, Apple Health first and unchanged, and folds Health Connect samples into hourly stats: rows under their own source, deleting the raw rows outright. The folded_window rule covers both sources for the hour window and looks a covering row up under the sample's own source; the day window stays Apple Health only. The Health Connect importer applies the same rule to raw samples, so an export that still holds folded minutes does not put them back.