mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
Hang `invalidateStatusInsightsForTypes` off every measurement ingest path so a new reading of a type drops the cached assessment rows that reading dirties — the next mount or nightly warm pass then regenerates them against the new data instead of serving the pre-measurement text for the rest of the day. Wired into both `/api/measurements` modes (single + multi-entry batch), `/api/measurements/batch`, and the three Withings sync paths (measures + activity + sleep), reusing the `collapseToTypeDayKeys` result each already computes for its rollup recompute. The call is fire-and-forget after the user's write commits: idempotent, never a blocker on the request path, and a failure only warns.