Skip to content

[Bug] Intervals.icu sync includes current day's planned workouts in Form (TSB) calculation #194

@phdelodder

Description

@phdelodder

When syncing data with Intervals.icu, the Form (TSB) value is being calculated using planned workouts for the current day. This results in an inaccurate "current" status, as the TSB should reflect the athlete's state before the day's planned stress is applied.

Steps to Reproduce

  • Ensure there is a planned workout scheduled for the current day with an estimated load/TSS.
  • Initiate a sync with Intervals.icu.
  • Compare the Form (TSB) value in the sync payload against the value calculated strictly from completed activities.

Expected Behavior

The Form (TSB) value provided during the sync should reflect the athlete's current recovery state based only on completed workouts (TSB=CTL−ATL). Planned workouts should not be factored into the "Current Form" until they are marked as Done.

Actual Behavior

The TSB calculation is prematurely "spending" the athlete's freshness by including planned load:

  • Excluding planned workouts: 'Form (TSB)': 8.53.
  • Including planned workouts: 'Form (TSB)': 1.60.

Impact

  • Inaccurate Recommendations: Since the AI uses this TSB value to determine if an athlete is "Fresh" or "Strained," it may incorrectly suggest a rest day because it thinks the athlete is already fatigued by a workout they haven't started.
  • Data Discrepancy: This creates a mismatch between the Coach dashboard and the Intervals.icu calendar views.

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions