Say why a standby's samples are not measured (diagnostics) #175

Merged
cmoriarty merged 1 commit from diagnose-offsets into main 2026-11-15 21:39:43 -05:00
Owner

Why

Since #172 was deployed (584162b, 2026-11-15 23:48 UTC), the live app has measured no standby. Every standby on three games reads "pending" after two and a half hours, with a viewer and without. So no swap can be aimed: both changes of stream since recorded "not aimed: no match". On the old build the first live game found a match within a minute.

What is ruled out:

  • No errors: none in the log, and no hung ffmpeg in the container.
  • Tonight's segments decode: the app's sound reader reads them fine (3 s of sound, not silent).
  • The comparison itself works: offline, a real channel with the watch's sampling found the relation to 0.001 s and trusted it.

What's left happens without a word: a comparison that ends early is not counted, and a pair dropped before it matched is not logged. So this change only says what happens.

What it adds (logging only; nothing compared or found changes)

  • Every 5 minutes, one line per link saying what its segments and samples came to. It also gives what its stream's pairs hold (state, results, matches, since when), how much of its sound is kept, and how many comparisons are still running. For example: offsets: in 300 s, https://…: 7 comparisons started, 7 ended early (its sound not decoded); pairs of …: … pending, 0 results (0 matched) since 2400 s ago.
  • The steps counted:
    • segments landed;
    • samples not fetched or not media;
    • samples alone, and why (no stream playing, not watched, not fed lately);
    • not due, settled as one stream, key refused, no sound found;
    • comparisons started, and those that ended early (not decoded, too short, silent);
    • matched, and missed (with whether anything of the stream playing was kept);
    • clock restarts and wraps, other streams behind a link.
  • The two silent events get a line, the first time in each span:
    • a link's clock taken for a restart (the jump, the pairs dropped, and how many had not matched);
    • another stream behind a link (its kept sound forgotten).

Checks

  • make test: 1,484 passed, 1 skipped (four new tests: the report's line, a sample not decoded, a clock restart said once a span, a sample with no stream fed beside it).
  • No frontend change.

After the deploy

Read the offsets: lines for one span (5 minutes) on a game with standbys, then fix what they show in its own pull request. The lines can come out once it is fixed.

🤖 Generated with Claude Code

## Why Since #172 was deployed (584162b, 2026-11-15 23:48 UTC), the live app has measured no standby. Every standby on three games reads "pending" after two and a half hours, with a viewer and without. So no swap can be aimed: both changes of stream since recorded "not aimed: no match". On the old build the first live game found a match within a minute. What is ruled out: - **No errors:** none in the log, and no hung `ffmpeg` in the container. - **Tonight's segments decode:** the app's sound reader reads them fine (3 s of sound, not silent). - **The comparison itself works:** offline, a real channel with the watch's sampling found the relation to 0.001 s and trusted it. What's left happens without a word: a comparison that ends early is not counted, and a pair dropped before it matched is not logged. So this change only says what happens. ## What it adds (logging only; nothing compared or found changes) - **Every 5 minutes, one line per link** saying what its segments and samples came to. It also gives what its stream's pairs hold (state, results, matches, since when), how much of its sound is kept, and how many comparisons are still running. For example: `offsets: in 300 s, https://…: 7 comparisons started, 7 ended early (its sound not decoded); pairs of …: … pending, 0 results (0 matched) since 2400 s ago`. - **The steps counted:** - segments landed; - samples not fetched or not media; - samples alone, and why (no stream playing, not watched, not fed lately); - not due, settled as one stream, key refused, no sound found; - comparisons started, and those that ended early (not decoded, too short, silent); - matched, and missed (with whether anything of the stream playing was kept); - clock restarts and wraps, other streams behind a link. - **The two silent events get a line**, the first time in each span: - a link's clock taken for a restart (the jump, the pairs dropped, and how many had not matched); - another stream behind a link (its kept sound forgotten). ## Checks - `make test`: 1,484 passed, 1 skipped (four new tests: the report's line, a sample not decoded, a clock restart said once a span, a sample with no stream fed beside it). - No frontend change. ## After the deploy Read the `offsets:` lines for one span (5 minutes) on a game with standbys, then fix what they show in its own pull request. The lines can come out once it is fixed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
After #172's deploy (584162b, 2026-11-15 23:48 UTC) the live app measured
no standby for hours: every pair read "pending" on three games, with a
viewer and without, and the log said nothing. Offline, through a real
channel, the comparison finds the relation, so the live path is what
is to be seen.

Nothing here changes what is compared or found:

- Each step a link's segments and samples go through is counted
  (offsets.note): landed, sampled with no stream playing beside it (and
  why), not due, key refused, no sound found, comparisons started,
  ended early (not decoded, too short, silent), matched, missed (and
  whether anything of the stream playing was kept), clock restarts.
- Every 5 minutes (offsets.report, asked by the watch's tick) one line
  per link says what they came to, with what its stream's pairs hold
  (state, results, matches, since when) and its sound kept, and one
  line for the comparisons still running.
- The two things that happened without a word now get a line the first
  time in each span: a link's clock taken for a restart (with the jump
  and the pairs dropped, matched or not) and another stream behind a
  link (its kept sound forgotten).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
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!175
No description provided.