Files
HealthLog/src/lib/sources
Marc-André Bombeck dab7de3786 test(sources): cross-source priority for Withings Activity + Apple Health
New test module exercises pickCanonicalSourceRows with the realistic
W17b/c shape: same user reporting both WITHINGS rows (from the new
activity / sleep sync routines) and APPLE_HEALTH rows (from the v1.5
iOS passthrough) for the same day.

Coverage:
  - Default Marc-directive priority picks APPLE_HEALTH for every
    cumulative metric (steps, active energy, distance, flights)
  - Same default applies to sleep — even when both sources captured
    the same set of per-stage rows from Migration 0055
  - Withings stays the fallback when Apple Health has no rows that
    day (today's v1.4.25 reality; v1.5 may flip it per-user)
  - User-level overrides re-prioritise the ladder as documented
  - Activity rows (sleepStage NULL) and sleep rows (sleepStage non-null)
    pick independently — Migration 0055's per-stage uniqueness doesn't
    leak into the picker's source axis.
2026-05-14 18:31:32 +02:00
..