mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
Mirrors the Google sleep suites name for name: the mapper keeps its externalIds across a re-score that re-classifies and renumbers segments, the sweep stays bounded to the night's window and never touches the fresh keep-set, a null window issues no delete at all, and a cleanup failure never fails the sync. The end-to-end fixture runs one night stored under the old keys through `syncUserSleep` and pins the ordering the heal depends on — sweep first, then the rescue re-keying the tombstoned rows in place, no parallel insert — plus a second pass that writes nothing at all. Also covers the repair's verdict gates (bounded 365-day window, marker stamped only on a clean run, watermark untouched, dead token and reauth park returning without a stamp), the unchanged-value skip including the re-classified segment it must not swallow, and both Retry-After paths.