Problem
The spec's "Calculating current track position" section provides an explicit drift formula using timestamp, progress.track_progress, and progress.playback_speed:
calculated_progress = progress.track_progress + (current_time - metadata.timestamp) * progress.playback_speed / 1000000
The metadata scenario (server-initiated-metadata) sends track_progress=12000, track_duration=180000, playback_speed=1000 and compares a static snapshot — equality pass/fail, no time advancement.
Proposed fix
Add a scenario that:
- Sends metadata at server time T with
track_progress=12000, playback_speed=1500 (1.5x).
- Holds the connection open for ~500 ms.
- Requests the client report its computed
current_track_progress_ms at disconnect time.
- Asserts it is within tolerance of
12000 + 500 * 1.5 = 12750.
Also cover playback_speed=0 (paused — calculated progress must equal track_progress unchanged) and verify min/max clamping around track_duration and zero.
Spec references
- "Calculating current track position"
Problem
The spec's "Calculating current track position" section provides an explicit drift formula using
timestamp,progress.track_progress, andprogress.playback_speed:The metadata scenario (
server-initiated-metadata) sendstrack_progress=12000,track_duration=180000,playback_speed=1000and compares a static snapshot — equality pass/fail, no time advancement.Proposed fix
Add a scenario that:
track_progress=12000,playback_speed=1500(1.5x).current_track_progress_msat disconnect time.12000 + 500 * 1.5 = 12750.Also cover
playback_speed=0(paused — calculated progress must equaltrack_progressunchanged) and verifymin/maxclamping aroundtrack_durationand zero.Spec references