Skip to content

0.1.5: a request started late gets as long as the first ones had - #6

Merged
0thernet merged 1 commit into
mainfrom
fix/late-requests
Nov 18, 2026
Merged

0thernet merged 1 commit into
mainfrom
fix/late-requests

Conversation

@0thernet

Copy link
Copy Markdown
Member

The false alarm

When the settle time ran out, ra reported every request still open as busy: "The page was still loading after 5s". That included a request the page had started a few milliseconds earlier.

A page whose live animation keeps bringing lazy pictures into view always has a new request somewhere, so a look at it with motion on could fail at random. In one CI run, 1 of 232 looks failed this way, on a 19KB picture asked for just before the deadline ([desktop.dark.motion]). The other 231 looks were clean.

The fix

ra now records when each request starts. When the settle time runs out, a request that started late gets the whole settle time from its own start. A request is reported only if it is still open after that, so "still loading after 5s" is now literally true.

  • Bounded wait. A request that starts late can make ra wait at most one more settle time.
  • Still reported: a long poll or a request that never answers, which is open from the start. They are reported at the deadline, as before.

Tests

The still-loading finding had no test until now. A new browser test checks two pages, with a 1.5s settle time:

  • ticking: always has one request open, but each is answered in 300ms and the next starts at once.
    • 0.1.4 reports busy: The page was still loading after 1.5s: GET /api/tick. The test fails against the old code, which I checked.
    • 0.1.5 reports nothing.
  • hanging: one request never answers. It is reported, word for word: busy: The page was still loading after 1.5s: GET /api/news.

Also

  • docs/findings.md says how late requests are treated.
  • The version is 0.1.5, and the README's install line points at it.

Checks

  • bun run check: 42 unit tests pass, the build passes, and ra --version prints 0.1.5.
  • bun run test:browser: 39 of 39 pass on Chromium 158.0.8127.18 with playwright-core 1.65.0.

🤖 Generated with Claude Code

When the settle time ran out, every request still open was reported as
"still loading after 5s", even one the page had started a moment before:
on a page whose live animation brings lazy pictures into view, a 19KB
picture asked for just before the deadline failed a CI run. Now a request
started late gets the whole settle time from its own start, and only one
still open after that is reported, so the message says what happened.

The still-loading finding had no test; it has one now, beside a page that
always has one short request open and is clean.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@0thernet
0thernet enabled auto-merge (squash) November 18, 2026 20:16
@0thernet
0thernet merged commit dd5ccf5 into main Nov 18, 2026
9 checks passed
@0thernet
0thernet deleted the fix/late-requests branch November 18, 2026 20:18
0thernet added a commit to hraness/stripe-history that referenced this pull request Nov 19, 2026
Moves ra from 0.1.3 to
[0.1.6](https://github.com/hraness/ra/releases/tag/v0.1.6), the latest
release. Between them:

- 0.1.4 ([ra #5](hraness/ra#5)) leaves alone
text behind a dialog that makes the rest of the page `inert` or
`aria-hidden`, measures a wrapped line that keeps its spaces from its
first letter to its last, and no longer waits for the tab icon.
- 0.1.5 ([ra #6](hraness/ra#6)) gives a request
that starts late as long to finish as the first ones had.
- 0.1.6 ([ra #11](hraness/ra#11)) prints the
first ten texts of a colour used in many places and counts the rest. The
release's other changes are to ra's README.

- `package.json` points at the v0.1.6 release asset. `bun.lock` holds
its sha512, which matches the asset `gh release verify-asset v0.1.6
hraness-ra-0.1.6.tgz -R hraness/ra` verified.
- ra declares the same peer dependency as 0.1.3 (playwright-core ≥ 1.58)
and has no dependencies of its own, so nothing else in the lockfile
changed.

Local checks on this head:
- `bun run check` passed (the cost surfaces, the typecheck, lint and 402
tests), and so did `bun run build`.
- `bun run ra check` passed: 15 states, 72 looks in 92 s, with 21 notes;
Chromium 151.0.7922.34 (Chrome for Testing, playwright-core 1.62.0).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant