A challenge's backoff no longer refuses the solver read that follows it #82

Merged
cmoriarty merged 1 commit from fix/solver-after-challenge into develop 2026-11-02 13:26:53 -05:00
Owner

Makes #78's fix work in production. OpenSpec change: solver-after-challenge.

The bug

The app's browser meets a challenge on a player page, and courtesy.record(challenge=True) backs the host off. solver.fetch_page, the next step of the same read, is then refused by that backoff and returns None. So the solver fallback for challenged player pages has not been running on any site, and PR #81's player frames were never reached. PR #81's tests replaced the solver and page read with stand-ins, which hid it.

The fix

  • solver.fetch_page(after_challenge=True) goes past the backoff (courtesy.acquire(past_backoff=True)), and a page coming back doesn't end it.
  • _read_player_page ends the backoff when the read finds a stream. A read that finds none keeps it, and it doubles as before, so a dead end like tvsportslive.fr is still left alone longer each time.
  • A host already backed off is still refused before a read starts.

Checks

  • Live, with this code unpatched, on Sassuolo vs. Fiorentina (dudestream1.com): read OK in 35 s through the solver and the streamec.st frame. An earlier run this session, with the backoff cleared by hand, passed the app's verify at 1280×720, 30 fps.
  • New tests run the real courtesy, solver seam and page read together; the main one failed before the fix.
  • make test: 872 passed, 1 skipped. One earlier run took 137 s and failed test_the_lifespan_writes_the_snapshot_before_its_other_shutdown_work. That didn't reproduce: it passes alone and the next full run took 16 s.

Worth watching after deploy: gated sites now get a solver read as designed, so solver use on those hosts goes up. A read of such a link takes about 35 s, not 20 s.

🤖 Generated with Claude Code

Makes #78's fix work in production. OpenSpec change: `solver-after-challenge`. ## The bug The app's browser meets a challenge on a player page, and `courtesy.record(challenge=True)` backs the host off. `solver.fetch_page`, the next step of the same read, is then refused by that backoff and returns None. So the solver fallback for challenged player pages has not been running on any site, and PR #81's player frames were never reached. PR #81's tests replaced the solver and page read with stand-ins, which hid it. ## The fix - `solver.fetch_page(after_challenge=True)` goes past the backoff (`courtesy.acquire(past_backoff=True)`), and a page coming back doesn't end it. - `_read_player_page` ends the backoff when the read finds a stream. A read that finds none keeps it, and it doubles as before, so a dead end like tvsportslive.fr is still left alone longer each time. - A host already backed off is still refused before a read starts. ## Checks - **Live, with this code unpatched, on Sassuolo vs. Fiorentina (`dudestream1.com`):** read OK in 35 s through the solver and the `streamec.st` frame. An earlier run this session, with the backoff cleared by hand, passed the app's verify at 1280×720, 30 fps. - New tests run the real courtesy, solver seam and page read together; the main one failed before the fix. - `make test`: 872 passed, 1 skipped. One earlier run took 137 s and failed `test_the_lifespan_writes_the_snapshot_before_its_other_shutdown_work`. That didn't reproduce: it passes alone and the next full run took 16 s. **Worth watching after deploy:** gated sites now get a solver read as designed, so solver use on those hosts goes up. A read of such a link takes about 35 s, not 20 s. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A challenge's backoff no longer refuses the solver read that follows it
All checks were successful
ci / Unit tests, type check, bundle (pull_request) Successful in 1m14s
ci / One container, e2e click-to-play inside the image (pull_request) Successful in 2m2s
474bd31cf5
The app's browser met a challenge on a player page, which backed the host off, and that backoff then refused the solver read that was the answer to the challenge. So the solver fallback for player pages, and #78's player frames, never ran in production. A live test on Sassuolo vs. Fiorentina found it.

The follow-up read now goes past the backoff its own read set. The backoff ends when the read finds a stream and stands otherwise, so a dead end is still left alone longer each time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cmoriarty merged commit 518cab0905 into develop 2026-11-02 13:26:53 -05:00
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!82
No description provided.