mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
With measuredAt now stamped at the segment END, a night that Withings re-aggregates between syncs shifts its enddate, so the measuredAt-keyed lookup missed the prior row and the create then collided with the unique externalId — leaving the night stuck at its stale value. Key the lookup on the stable externalId and refresh value, measuredAt and stage on update. Caught by the withings-sleep-sync integration test against real Postgres.