The Playing card counts swaps but can't show them: what each one dropped, why, which stream it landed on, and what it will try next #90
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What happens
The Playing card counts a channel's swaps but can't show them. On Ravens vs. Jaguars (2026-11-05) the card said 11 swaps. Its recent list showed only the last four events, and none of them said why the old link was dropped or which stream the new one was.
To find out what the 11 were, I had to put together the event log, the container log and the splice lines' source timestamps. Each stream has its own clock, so the same clock value behind two sites means they carry the same stream.
The 11 swaps, tuned 9:49 PM ET on buff-streams.buzz:
The 11 swaps used 9 sites, but behind them were only 4 streams. Stream A (now
hls.meth-streams-hd.cfd) was landed on five times, through three sites. buff-streams.buzz and topsurge.st carry the same stream: their clocks matched to 0.1 s at an earlier swap (9:37 PM). From the card, the viewer saw a long list of different sites, but the channel was really cycling through the same few streams.What the app knows but doesn't keep:
Health.failed_by: no new segment, playlist reload failures, segment errors, refused segments;degrading_by: stalling, behind, frames, late). It is shown only on the live card, while it is true, and then it is lost:swapped/recoveredevents don't record it.channel <id>: recovered on <player page>andchannel <id>: swapped a degrading upstream for the standby. Nothing is logged when the failure is detected (_start_recoveryand_maybe_swapare called silently). The last upstream error (last_error, e.g. "playlist: upstream unreachable: ConnectTimeout") is never logged either.clock: seq N splices (… filler)) before some of them.stream_identityalready exists (#74), but it is used only to choose standbys.Channel._adoptcounts both).What it costs
When a game keeps swapping, the card can't answer the questions that decide what to do:
The idea
The swap count opens the list. Clicking it shows every swap since the tune, newest first. Each row has the time, how it happened (recovery, degrading swap, standby, re-read, ladder), the site it landed on, a chip for the stream, the picture, and how long the previous link lasted.
Why it left. Each row shows the reason in a few words, such as "no new segment for 12 s", "3 segment errors", "stalling" or "behind". The longer explanation sits behind an info icon.
Show the streams. Each distinct stream behind the links gets a small chip (a letter or a colour) on each row and on the card's current link and standby. That way a repeat is obvious at a glance. When the channel lands on a stream that failed in the last few minutes, the row is marked.
Split the count. Show recoveries and degrading swaps separately, for example "9 + 2", with the meaning in a tooltip.
The link list, live, to watch the logic work. The card shows the game's links in the order the app will try them (
Ladder.order), updating as things happen:A failure should be visible as it happens: the failed link drops to the bottom with a 10:00 countdown, the standby moves up to playing, the backup moves up to standby, and the next standby read takes the first link that can be tried. Tonight's list had 28 links. At 10:16 PM topsurge.st and buff-streams.buzz were cooling with about a minute left. Nine other sites had failed earlier in the game and were back in the order. The panel showed none of this; it only says "N of M links cooling" in the problems list. When #91 lands, a failed stream's other sites sink here too, and that can be seen.
Backend, the event log: the
swappedandrecoveredevents record:They should also stay readable after the game, so the History section can show the same rows.
Backend, the list. The admin view carries the game's ladder in order. Each link has:
Ladder.streams).The ladder is per game and source. When there is more than one source, the list takes the one playing.
Backend, the container log. Each swap can be explained from
docker logsalone, at INFO:channel nfl-401873037: givemestreams.cfd (hls.meth-streams-hd.cfd) failed: no new segment for 12 s; last error: playlist ConnectTimeout. A degrading swap's line names itsdegrading_byreason in the same way (stalling, behind, frames, late).recovered onandswappedlines add how it landed (standby, re-read, ladder), the new stream host and stream identity, and the picture.Defaults (per the front-end preferences):
Not part of this: changing what the recovery picks. Here, the recovery went back to stream A after it had just failed. That belongs in its own issue.
The Playing card counts swaps but can't show them: what each one dropped, why, and which stream it landed onto The Playing card counts swaps but can't show them: what each one dropped, why, which stream it landed on, and what it will try nextMerged in PR #112 (
46a39c3) with the Playing card (#105), deployed 2026-11-08 08:21Z (container 0b677e66cda0) while nobody watched; the change is archived indfbe572.What now records each swap:
no new segment for 12 s; last error: playlist: …,3 segment errors in a minute,2 segments refused in a row (403),the player ran dry 2 times in 2 min/got 0.8× real time,fell behind its source,3 of the last 5 segments short of frames,3 of the last 5 segments came late. Swap now, Go back, Wrong game and the background trade are causes too.swappedandrecoveredcarrycause,why,how(standby, reread, ladder, degrading, operator, back, trade, wrong_game),from_stream/to_stream(the stream mark),from_stream_host/to_stream_host, andquality.channel <id>: givemestreams.cfd (hls.meth-streams-hd.cfd) failed: no new segment for 12 s; last error: …when the failure is detected, before the recovery starts;channel <id>: p1 (stream host) degrading: 3 of the last 5 segments came late; swapping to the standby p2;channel <id>: recovered on <url> via the standby, stream <mark> on <stream host>, 1280×720, 59.94 fps;channel <id>: the standby was not ready,channel <id>: re-reading <host> found nothing (<reason>).Not part of this, as the issue said: what the recovery picks.
Not seen live yet. Left open for the live check: the next recovery in production logs a
failed:line and a landing line withvia …, stream ….Closed at the owner's word (2026-11-08): shipped in PR #112, deployed 08:21Z, archived in
dfbe572. Reopen if the live check on a watched game shows otherwise.