A backdated threshold save doesn't re-plan #145

Open
opened 2026-11-08 18:15:42 +00:00 by chris-kreidl · 2 comments
chris-kreidl commented 2026-11-08 18:15:42 +00:00 (Migrated from github.com)

(session 28) A threshold save re-plans only when today's FTP changes (ftpTrigger). A backdated entry that leaves today's FTP alone still rescores rides and moves CTL/ATL, but queues no re-plan; the next trigger sees the new load. Add a load-changed trigger if that lag matters.

Moved from docs/PROGRESS.md → Follow-ups → Later on 2026-11-08.

(session 28) A threshold save re-plans only when today's FTP changes (`ftpTrigger`). A backdated entry that leaves today's FTP alone still rescores rides and moves CTL/ATL, but queues no re-plan; the next trigger sees the new load. Add a load-changed trigger if that lag matters. _Moved from docs/PROGRESS.md → Follow-ups → Later on 2026-11-08._
chris-kreidl commented 2026-11-08 20:08:41 +00:00 (Migrated from github.com)

What this is about. In Settings → Thresholds you can add an FTP dated in the past. That rescores the rides since that date, which moves fitness and fatigue. But a re-plan is queued only when today's FTP changes (ftpTrigger in src/server/replan/triggers.ts), so a backdated entry changes your load without the plan reacting until the next trigger (a ride, a missed session).

Status (checked 2026-11-08): unchanged.

Fix, if the lag matters: a "load changed" trigger when a rescore moves recent CTL/ATL by more than a small amount. Session 51 (#226) reworks when re-plans run, so it's the place to decide.

**What this is about.** In Settings → Thresholds you can add an FTP dated in the past. That rescores the rides since that date, which moves fitness and fatigue. But a re-plan is queued only when *today's* FTP changes (`ftpTrigger` in `src/server/replan/triggers.ts`), so a backdated entry changes your load without the plan reacting until the next trigger (a ride, a missed session). **Status (checked 2026-11-08):** unchanged. **Fix, if the lag matters:** a "load changed" trigger when a rescore moves recent CTL/ATL by more than a small amount. Session 51 (#226) reworks when re-plans run, so it's the place to decide.
chris-kreidl commented 2026-11-19 03:21:34 +00:00 (Migrated from github.com)

Status (checked 2026-11-18): still open. Session 51 (#226) didn't add a load-changed trigger. addThreshold and deleteThreshold (src/server/athlete.ts) rescore, then onThresholdSaved re-plans only when today's FTP changes (ftpTrigger, src/server/replan/triggers.ts:169).

**Status (checked 2026-11-18):** still open. Session 51 (#226) didn't add a load-changed trigger. `addThreshold` and `deleteThreshold` (`src/server/athlete.ts`) rescore, then `onThresholdSaved` re-plans only when today's FTP changes (`ftpTrigger`, `src/server/replan/triggers.ts:169`).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ckreidl/trainer#145
No description provided.