A relation that will not hold still is unsteady, compared rarely and never fresh (#186) #188

Merged
cmoriarty merged 1 commit from timestamps-that-stand-still into main 2026-11-17 02:05:53 -05:00
Owner

Fixes #186.

The fault

On 2026-11-17, during Ravens vs. Chargers, topsurge.st's stream (hls.lshls.st/secure_hls.php) matched the stream playing at a different place almost every time.

  • Its relation kept moving. It was found again 109 times that night. After 02:00 it moved about 5 s further at each sample, 46 s apart: its sound runs about 10% slower than its timestamps say.
    • The ticket first said its timestamps hardly moved. The full log shows this instead, and the ticket now has a comment correcting it.
  • It was never trusted, so it was compared on every sample. That was 211 of the night's 596 comparisons, and comparisons run one at a time.
  • Its row showed a figure that held for no moment.
  • A join onto it could have gone wrong. A join could have gone by a match up to a minute old, with no check of its own, and that relation moves about 6 s a minute.

The fix

  • A relation that keeps moving is marked unsteady. A pair whose relation moves at three matches in a row (Pair.moves, UNSTEADY_MOVES) reads "unsteady". It is then:
    • compared every 180 s, like a trusted pair or one with no match;
    • given no seconds by view();
    • never called fresh by known(), so a join onto it checks it by the sound at the join.
  • A change of stream is measured only by a recent match. moved() counts an unsteady pair's match only from the last 20 s, which is the check at the join it was just aimed by.
  • Recovery and restarts work as before. A match where the relation was ends the unsteady state, and trust builds as ever. A stream that restarts is dropped, found again and trusted as before.
  • The log stays short. It names each move until the third, then says once that the pair is unsteady, and once if it holds again.
  • The page. The game page tags such a link "Unsteady", quietly and with no figure. Its hover: "Its sound matches at another place each time, so no figure holds. A change of stream onto it is checked by its sound."
  • Specs. stream-supervision gains "A relation that will not hold still is unsteady", with three scenarios, and its change-of-stream requirement names the 20 s. admin-page gains "A link whose relation will not hold still says so".

Checks

  • New tests. Both fail on main's code.
    • test_a_relation_that_moves_at_every_match_is_unsteady_compared_rarely_and_never_fresh: a standby whose sound moves 0.11 s a second against its timestamps.
      • It is found at the first match, moves twice, and is unsteady at the third move, with no figure.
      • known() is not fresh, and it is not compared for three minutes. When its match holds again, it is trusted.
      • Over 400 s of this case, main compared it 9 times and showed it 46.8 s behind; the stream was about 4 s behind. Now it is compared 5 times and reads "Unsteady", with no figure.
    • test_a_stream_that_restarts_is_found_again_and_trusted_and_never_unsteady: the forprivateuse.sbs pattern.
  • Page test. The new tag test is in admin-lanes.test.ts. The page's 288 tests pass, and npm run build (tsc and vite) passes.
  • The whole lane. make test, after building the page, gave 1,495 passed and 1 skipped, in 31 s at a load average of 3.
  • OpenSpec. openspec validate stream-supervision --type spec --strict and openspec validate admin-page --type spec --strict give the same 24 and 5 long-requirement warnings as on main, and no new ones.

🤖 Generated with Claude Code

Fixes #186. ## The fault On 2026-11-17, during Ravens vs. Chargers, topsurge.st's stream (`hls.lshls.st/secure_hls.php`) matched the stream playing at a different place almost every time. - **Its relation kept moving.** It was found again 109 times that night. After 02:00 it moved about 5 s further at each sample, 46 s apart: its sound runs about 10% slower than its timestamps say. - The ticket first said its timestamps hardly moved. The full log shows this instead, and the ticket now has a comment correcting it. - **It was never trusted,** so it was compared on every sample. That was 211 of the night's 596 comparisons, and comparisons run one at a time. - **Its row showed a figure that held for no moment.** - **A join onto it could have gone wrong.** A join could have gone by a match up to a minute old, with no check of its own, and that relation moves about 6 s a minute. ## The fix - **A relation that keeps moving is marked unsteady.** A pair whose relation moves at three matches in a row (`Pair.moves`, `UNSTEADY_MOVES`) reads "unsteady". It is then: - compared every 180 s, like a trusted pair or one with no match; - given no seconds by `view()`; - never called fresh by `known()`, so a join onto it checks it by the sound at the join. - **A change of stream is measured only by a recent match.** `moved()` counts an unsteady pair's match only from the last 20 s, which is the check at the join it was just aimed by. - **Recovery and restarts work as before.** A match where the relation was ends the unsteady state, and trust builds as ever. A stream that restarts is dropped, found again and trusted as before. - **The log stays short.** It names each move until the third, then says once that the pair is unsteady, and once if it holds again. - **The page.** The game page tags such a link "Unsteady", quietly and with no figure. Its hover: "Its sound matches at another place each time, so no figure holds. A change of stream onto it is checked by its sound." - **Specs.** stream-supervision gains "A relation that will not hold still is unsteady", with three scenarios, and its change-of-stream requirement names the 20 s. admin-page gains "A link whose relation will not hold still says so". ## Checks - **New tests.** Both fail on main's code. - `test_a_relation_that_moves_at_every_match_is_unsteady_compared_rarely_and_never_fresh`: a standby whose sound moves 0.11 s a second against its timestamps. - It is found at the first match, moves twice, and is unsteady at the third move, with no figure. - `known()` is not fresh, and it is not compared for three minutes. When its match holds again, it is trusted. - Over 400 s of this case, main compared it 9 times and showed it 46.8 s behind; the stream was about 4 s behind. Now it is compared 5 times and reads "Unsteady", with no figure. - `test_a_stream_that_restarts_is_found_again_and_trusted_and_never_unsteady`: the forprivateuse.sbs pattern. - **Page test.** The new tag test is in `admin-lanes.test.ts`. The page's 288 tests pass, and `npm run build` (tsc and vite) passes. - **The whole lane.** `make test`, after building the page, gave 1,495 passed and 1 skipped, in 31 s at a load average of 3. - **OpenSpec.** `openspec validate stream-supervision --type spec --strict` and `openspec validate admin-page --type spec --strict` give the same 24 and 5 long-requirement warnings as on main, and no new ones. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
On 2026-11-17 topsurge.st's stream (hls.lshls.st) matched the stream
playing at another place almost every time: its relation was found
again 109 times that night, about 5 s further along at each sample 46 s
apart after 02:00 (its sound running about 10% slower than its
timestamps). It was never trusted, so it was compared on every sample,
211 of the night's 596 comparisons, and its row showed a figure that
held for no moment.

A pair whose relation moves at three matches in a row (Pair.moves,
UNSTEADY_MOVES) now reads "unsteady": it is compared every 180 s, like
a trusted pair or one with no match; view() gives it no seconds; and
known() never calls it fresh, so a join onto it is checked by the sound
at the join instead of going by a match up to a minute old. moved()
counts its match only from the last 20 s (the check at the join it was
just aimed by). A match where the relation was ends it, and trust builds
as ever; a stream that restarts is dropped, found again and trusted as
before. The log says each move until the third, then once that the pair
is unsteady.

The game page tags such a link "Unsteady", quietly, with no figure. The
stream-supervision and admin-page specs say so, with scenarios and their
tests: in the test's 400 s, a relation moving 0.11 s a second was
compared 9 times and shown 46.8 s behind on main (it was 4 s behind);
now 5 times, unsteady, with no figure.

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!188
No description provided.