From 3077adfe06fe40613e3b678423ce2c1cd19a6b2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 14 Jun 2026 11:03:24 +0200 Subject: [PATCH] docs(whoop): correct the sync overlap comment after the workout widening The header comment still described WHOOP_RECOVERY_SLEEP_OVERLAP_MS as 24 h and claimed workout ingest used the narrow default. The constant has been 7 days, and workout ingest now shares it so a late phone-sync to the WHOOP cloud no longer drops the workout outside the window. Comment only. --- src/lib/whoop/sync.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/whoop/sync.ts b/src/lib/whoop/sync.ts index dd691f191..48ff81fe8 100644 --- a/src/lib/whoop/sync.ts +++ b/src/lib/whoop/sync.ts @@ -17,8 +17,10 @@ * * The incremental window starts from `lastSyncedAt - overlap`. WHOOP re-scores * recovery/sleep hours after the night, so the overlap must comfortably cover - * the re-score lag — `WHOOP_RECOVERY_SLEEP_OVERLAP_MS` is 24 h; workout/cycle - * use the smaller `WHOOP_DEFAULT_OVERLAP_MS`. + * the re-score lag — `WHOOP_RECOVERY_SLEEP_OVERLAP_MS` is 7 days, now shared by + * workout ingest too (a phone that syncs to the WHOOP cloud well after a + * workout would otherwise fall outside a narrow window and never land); + * `WHOOP_DEFAULT_OVERLAP_MS` stays the narrow fallback for other resources. */ import { AsyncLocalStorage } from "node:async_hooks"; import { prisma } from "@/lib/db";