8000 fix(browser): keep asking Linux for the page until WebKit begins the load by aorumbayev · Pull Request #185 · kagan-sh/kagan · GitHub
[go: up one dir, main page]

Skip to content

fix(browser): keep asking Linux for the page until WebKit begins the load - #185

Merged
aorumbayev merged 6 commits into
mainfrom
fix/browser-proof-linux
Dec 3, 2026
Merged

aorumbayev merged 6 commits into
mainfrom
fix/browser-proof-linux

Conversation

@aorumbayev
@aorumbayev aorumbayev commented Dec 3, 2026 •
Copy link
Copy Markdown
Member

What

On Linux the Browser now keeps asking for a page's address until WebKit reports that the load began, for up to ten seconds, instead of asking once after 80 ms. CI's page server answers each connection on its own thread, so one idle connection cannot hold back the request the run waits for, and a failed Browser run prints that server's log.

Why

The Browser page step on main found the window and the tab up but the local page was never requested, and stayed that way for the whole 30 s wait. The single retry after 80 ms landed before the frame that sizes the view, so WebKitGTK dropped it too and nothing asked again.

How

Asking again is driven by the page's own report that WebKit began a load, not by a timer, and any load that began ends it, so a later address is never cancelled. A page that begins a load which then fails still fails the check.

Test plan

  • cargo t --workspace --locked: 2680 passed.
  • sh scripts/smoke.sh --keep: ok.
  • linux-tests → Browser page, re-run three times, each green.
  • The page server with one connection left idle: serves GET / and the token POST, which it previously timed out on.

…load

A Linux page was built at 0×0 and asked for its address again once, after
a fixed 80 ms wait. On a slow start that wait lands before the frame that
sizes the view, WebKitGTK drops both navigations, and nothing asks again:
the tab stays up and the page's server never sees a request.

The page now reports whether WebKit began the latest address it was given,
and the Browser asks again every 100 ms for up to 10 s until it did.

The page server in scripts/browser.sh is threaded: one idle connection can
no longer hold back the request the run waits for, and a failure prints
that server's log.
The retry compared the page's latest request with the load WebKit reported,
so a person who navigated to another address in the first seconds made the
retry ask for the first one again and cancel theirs. Any load that began is
enough: the page is loading, so nothing asks again.
The retry asked for the first address every 100 ms until the page
reported a load, which replaced a newer address that had not committed
yet and restarted a slow real page up to 100 times. A tick now stops on
a newer request or a committed load, waits while a navigation is in
flight, and asks only when the view is idle and nothing arrived. wry
reports WebKit's `Committed` event, not its start, so the words say
committed.

The retry is held in the Browser and dropped when the tab closes. The
policy has a test that fails when its newer-address or in-flight arm is
weakened, and the retry's removal leaves the test unresolved. Decision
164 carries the new wording and the cost line.
@aorumbayev
aorumbayev marked this pull request as ready for review December 3, 2026 16:29
@aorumbayev
aorumbayev merged commit ce896aa into main Dec 3, 2026
35 of 39 checks passed
@aorumbayev
aorumbayev deleted the fix/browser-proof-linux branch December 3, 2026 17:49
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

0