A restart is told by the stream's own timestamps, not its clock falling behind (#190) #192
Loading…
Reference in a new issue
No description provided.
Delete branch "slow-source-restarts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #190.
The fault
On 2026-11-17, shd247.world's sources listed media at 0.0 to 0.7 times real time, stalling and bursting. The app took them for a new stream about every 90 s: 28 drops on four links in 25 minutes, most before their pairs had matched.
The fix
offsets._listedcompares the link's own timestamps with its last segment (_last_end). It takes them for a new stream only when they go back more thanRESTART_SECONDS(30 s), or leap ahead of the time that passed by more thanLEAP_SECONDS(600 s). Tonight's real restarts moved by thousands of seconds.Checks
test_a_source_at_half_speed_listing_in_bursts_is_never_taken_for_a_new_streamcovers a 0.5× source listing in bursts a minute apart.test_timestamps_that_go_back_or_leap_far_ahead_are_a_new_stream_and_a_catch_up_is_not:make testgave 1,500 passed and 1 skipped, in 35 s at a load average of 2.6.openspec validate stream-supervision --type spec --strictgives the same 24 long-requirement warnings as on main, and no new ones.🤖 Generated with Claude Code