mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
Refine the go-forward aggregated HR wire contract (iOS #34) from the never- adopted hourly bucket to a 10-minute UTC bucket, so one contract serves both the measurements-list de-explosion and the intraday-pulse 10-min curve. - Batch route accepts stats:HKQuantityTypeIdentifierHeartRate:<10-min ISO-Z> with avg + min/max, overwrite semantics, malformed-suffix rejection; the validator is identifier-generic (allowlist) so respiratoryRate/SpO2 can join later without a grammar change. - The intraday reader classifies a day's PULSE rows three ways by externalId shape (raw / uploaded 10-min bucket / server-folded hourly), builds the 10-min curve directly from uploaded buckets with the min/max envelope and tension detection enabled, and overlays buckets over raw on the one cutover-straddling day. - DAY rollup min/max read COALESCE(value_min, value) so a bucket-native day's band reflects the true intra-bucket extremes. No schema change (value_min/value_max exist since v1.19.2). Reconciliation is go-forward cutover; the nightly retention fold handles the raw backlog.