A topsurge.st link's renewal is another stream, so every half hour the channel waits for the old one to fail #194

Closed
opened 2026-11-18 11:00:37 -05:00 by cmoriarty · 1 comment
Owner

What happens

From the app's log, 2026-11-15 16:46Z to 2026-11-18 07:02Z (43 games, 81 changes of stream): 16 changes were "its session ended". 15 of the 16 were streams on hls.lshls.st, most read through topsurge.st and three through bally-sports.lat. It is the second most common reason a channel changed stream, after a 16 s stall (27, #169).

The app knew minutes ahead. Every renewal of a topsurge.st link in the games read says "(it now points to another stream)". Republic of Ireland vs. Kosovo, 2026-11-17: renewed at 20:21, 20:46, 21:12 and 21:37Z, each time "another stream".

A renewal onto another stream is not taken by the playing channel. The channel plays the old address until its session ends, and then recovers:

Game Renewed (Z) Then (Z)
Argentina vs. Costa Rica 23:32:50, "3 min before it expired (it now points to another stream)" 23:36:19, "recovered on bally-sports.lat (its session ended)". The same at 00:07 and 00:37.
Bosnia-Herzegovina vs. Romania 20:42:49, "4 min before it expired (it now points to another stream)" 20:47:03, recovered on watchsports.online, another site's standby

5 of the 16 changes were aimed. Of the 6 whose move was measured, two moved the picture by 93.9 s and −30.3 s.

Why

Channel._take_renewal (backend/app/channel.py) takes a renewal only when it is the same stream (resolution.renewal_of). Its docstring: "A renewal that points to another stream is left for the old URL's failure and the recovery, which lands it as any new stream."

That was written before #168. A change of stream could not be aimed then, so waiting cost nothing. Now a change made while the old stream still plays can be aimed. One made after it has failed often is not.

The idea

  • Change on time. When the playing link's renewal points to another stream, change to it before the old address ends, while both still play. It is a planned swap, aimed as #168 aims one. Start: as soon as the renewed link has a trusted relation (#167), and no later than 30 s before the old address ends.
  • When there is no relation by then, change anyway before the end, unaimed, and say so. The jump is the one made today, without the failure and the recovery.
  • Renew earlier if the watch needs more time to measure the new address. Today a renewal runs 3 to 5 min before the old address expires.

What is known, and what is not

  • Known: the 16 changes, the renewals that point to another stream, and the code path above.
  • Not known:
    • Whether the renewed address is the same encode under a new session. Its segments' timestamps would say; if it is, it can be joined like a copy at once.
    • Whether every lshls renewal is another stream, or only those of these two sites.
    • How long the watch takes to give a renewed link a trusted relation.

Done when

In the unit lane, with the generated streams of #167:

  • Renewed onto another stream, with a trusted relation: the channel changes to it before the old address ends. The change is aimed, no second is missing or repeated, and no failure is recorded.
  • No relation by the deadline: it changes before the end, unaimed, and the event says why.
  • Renewed onto the same stream: as today (_carry_on, no swap).
  • A renewal that fails: as today. The old address plays until it ends.

Live: on a topsurge.st or bally-sports.lat game, a half hour passes with a "renewed … (it now points to another stream)" line and no "its session ended" recovery.

Specs: stream-supervision, event-log.

Found while reviewing the open tickets on 2026-11-18. Close to #169: both make a forced change of stream land on the same moment.

## What happens From the app's log, 2026-11-15 16:46Z to 2026-11-18 07:02Z (43 games, 81 changes of stream): 16 changes were "its session ended". 15 of the 16 were streams on `hls.lshls.st`, most read through topsurge.st and three through bally-sports.lat. It is the second most common reason a channel changed stream, after a 16 s stall (27, #169). The app knew minutes ahead. Every renewal of a topsurge.st link in the games read says "(it now points to another stream)". Republic of Ireland vs. Kosovo, 2026-11-17: renewed at 20:21, 20:46, 21:12 and 21:37Z, each time "another stream". A renewal onto another stream is not taken by the playing channel. The channel plays the old address until its session ends, and then recovers: | Game | Renewed (Z) | Then (Z) | | --- | --- | --- | | Argentina vs. Costa Rica | 23:32:50, "3 min before it expired (it now points to another stream)" | 23:36:19, "recovered on bally-sports.lat (its session ended)". The same at 00:07 and 00:37. | | Bosnia-Herzegovina vs. Romania | 20:42:49, "4 min before it expired (it now points to another stream)" | 20:47:03, recovered on watchsports.online, another site's standby | 5 of the 16 changes were aimed. Of the 6 whose move was measured, two moved the picture by 93.9 s and −30.3 s. ## Why `Channel._take_renewal` (`backend/app/channel.py`) takes a renewal only when it is the same stream (`resolution.renewal_of`). Its docstring: "A renewal that points to another stream is left for the old URL's failure and the recovery, which lands it as any new stream." That was written before #168. A change of stream could not be aimed then, so waiting cost nothing. Now a change made while the old stream still plays can be aimed. One made after it has failed often is not. ## The idea - **Change on time.** When the playing link's renewal points to another stream, change to it before the old address ends, while both still play. It is a planned swap, aimed as #168 aims one. Start: as soon as the renewed link has a trusted relation (#167), and no later than 30 s before the old address ends. - **When there is no relation by then,** change anyway before the end, unaimed, and say so. The jump is the one made today, without the failure and the recovery. - **Renew earlier** if the watch needs more time to measure the new address. Today a renewal runs 3 to 5 min before the old address expires. ## What is known, and what is not - **Known:** the 16 changes, the renewals that point to another stream, and the code path above. - **Not known:** - Whether the renewed address is the same encode under a new session. Its segments' timestamps would say; if it is, it can be joined like a copy at once. - Whether every lshls renewal is another stream, or only those of these two sites. - How long the watch takes to give a renewed link a trusted relation. ## Done when In the unit lane, with the generated streams of #167: - **Renewed onto another stream, with a trusted relation:** the channel changes to it before the old address ends. The change is aimed, no second is missing or repeated, and no failure is recorded. - **No relation by the deadline:** it changes before the end, unaimed, and the event says why. - **Renewed onto the same stream:** as today (`_carry_on`, no swap). - **A renewal that fails:** as today. The old address plays until it ends. Live: on a topsurge.st or bally-sports.lat game, a half hour passes with a "renewed … (it now points to another stream)" line and no "its session ended" recovery. Specs: `stream-supervision`, `event-log`. Found while reviewing the open tickets on 2026-11-18. Close to #169: both make a forced change of stream land on the same moment.
Author
Owner

Merged in PR #195 (merge 4d8b2c5), archived in fbe6270, live as fbe6270 since 2026-11-18 17:54Z.

What it does. A renewal of the link playing that points to another stream is now changed to at the puller's next round, while the old address still plays.

  • The log says "changed to the renewed link before the old address ended"; the event carries cause renewed and how renewal.
  • The join takes the two for one stream by their clocks until the pictures or the sound place the new one. When neither does, it lands as before and says why.

Also fixed. A join onto another stream of the same page link handed its own downloads to the watch, which replaced the old stream's kept sound before the check. The check then found the new stream in its own sound, at zero. That is the likely cause of the +93.9 s re-read on Argentina vs. Costa Rica (2026-11-18 00:07Z). Those downloads now skip the watch.

Not seen live yet: on a topsurge.st or bally-sports.lat game, a half hour should pass with a renewal changed to and no "its session ended" recovery.

Merged in PR #195 (merge 4d8b2c5), archived in fbe6270, live as fbe6270 since 2026-11-18 17:54Z. **What it does.** A renewal of the link playing that points to another stream is now changed to at the puller's next round, while the old address still plays. - The log says "changed to the renewed link before the old address ended"; the event carries cause `renewed` and how `renewal`. - The join takes the two for one stream by their clocks until the pictures or the sound place the new one. When neither does, it lands as before and says why. **Also fixed.** A join onto another stream of the same page link handed its own downloads to the watch, which replaced the old stream's kept sound before the check. The check then found the new stream in its own sound, at zero. That is the likely cause of the +93.9 s re-read on Argentina vs. Costa Rica (2026-11-18 00:07Z). Those downloads now skip the watch. Not seen live yet: on a topsurge.st or bally-sports.lat game, a half hour should pass with a renewal changed to and no "its session ended" recovery.
Sign in to join this conversation.
No labels
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
cmoriarty/sports-breaker#194
No description provided.