v1.4.39.1 — Rollup tier catches Withings + import + admin-restore write paths
Hotfix on top of v1.4.39. Three measurement write paths bypassed the persistent rollup tier's write hook, so the dashboard chart's source=rollup fast-path painted "Noch nicht genug Daten" on the 30 / 90-point range for accounts whose recent data only came through those paths. The 7-day window kept rendering because the chart's raw fetch never consults the rollup tier.
Fixed
- Withings sync (
sync.ts/sync-activity.ts/sync-sleep.ts): every(type, day)pair the sync touched is now handed torecomputeBucketsForMeasurement. Collapsed viacollapseToTypeDayKeysso a 30-day catch-up costs at most ~N (type, day) recomputes rather than one per row. /api/importendpoint: measurement creates now track touched(type, day)pairs and fold the rollup tier at the end of the batch. Mirrors the v1.4.39 mood-rollup hook on the same route.- Admin backup restore: the transaction now wipes the user's
measurement_rollupspartition alongsidemood_entry_rollups, and the post-transaction step kicksrecomputeUserRollupsso the restored dataset paints fresh tiles instead of carrying the previous owner's daily means forward. - Boot-time backfill discovery (
enqueueBootTimeRollupBackfill): the missing-coverage join moved from per-type to per-day, so an account whose Withings sync wrote 27 days of BP without ever firing the rollup hook now re-surfaces on the next worker boot even when one prior rollup row already existed for the same type.
Notes
- No schema migration. Additive write-hook plumbing only.
pnpm test --rungreen at 4648 / 4649 (1 long-standing skip).