You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_a_page_up_in_a_log_a_stream_feeds_leaves_its_end: Firefox PageUp on a link left the streamed log at its end in one trial #6159
tests/browser/widgets/test_workspaces_and_bounds.py::test_a_page_up_in_a_log_a_stream_feeds_leaves_its_end[firefox_browser-PageUp on a link] failed on push run 43824739395 (e53ccd151). In one of its six trials, PageUp left the streamed log at its end. The deciding assertion lists each trial's distance from the end (short), and every other trial reads about 2500 px:
The Chromium variants and Firefox's other aims passed in the same run. None of the 40 ci runs on main before it failed this test, though most were cancelled before they ran it.
Not reproduced yet. Running the test by node id on current main (fb3129611) passed three times on an idle 4-core runner and three more times with six busy-loop processes competing for the CPU. That is 36 trials without a loss.
Leading hypothesis, unconfirmed. PageUp on a link starts the reader's scroll sequence at the key (aimScroll → startReaderScroll), and the log's end keeper holds off while that sequence says the reader heads up. #6116 (7423589b6, in this run's range) documented the gap in arrivals.js: a Firefox starved of CPU can apply a key's scroll up to 800 ms after the key, so the 80 ms quiet spell (SETTLE_MS) can end the reader's sequence before the box moves. The keeper would then read a reader still at the end, scroll back, and cancel the PageUp. The trial matches that outcome, ending at the log's end. #6116 kept the 80 ms knowingly, after measuring 10 of 10 key losses under heavy background load. What #6116 itself changed in scrolling.js (a landed glide's release ending the sequence at once) only affects glides, and the keeper's scrollToEnd writes instantly here, so that part doesn't look involved.
What remains is to reproduce under real CPU starvation, for example with Firefox pinned to one core shared with load, or under a cgroup CPU quota like CI's per-worker cgroups. That would show whether the spell is what lost the key. If it is, either the product keeps the reader's input in force until the box moves or a backstop expires, or this test's Firefox PageUp on a link case asserts a guarantee #6116 accepted it can't give a starved Firefox. Choosing between those is a maintainer decision.
Reproduced, and the quiet spell is the cause. This needs a maintainer decision, so I'm assigning it to @max-sixty.
With Firefox and the test pinned to one core shared with busy loops, the test failed in 1 of 6 runs under two loops and 1 of 10 under four. Each failure had the CI shape: one trial at the log's end and the rest about 2700 px up. To check the hypothesis, a temporary probe in arrivals.js counted each time the 80 ms spell (SETTLE_MS) ended a sequence that startReaderScroll had started while awaitsReader still held. In other words, the reader's scroll ended before the box moved. Six runs of 24 trials each, all under four loops, made 144 trials:
The one trial that lost the PageUp, ending 0 px from the end, is the only trial where the probe fired.
In all 143 trials that kept the PageUp, the probe never fired.
So the loss is the one #6116 weighed and accepted: a starved Firefox applies the key's scroll after the spell has ended the reader's sequence, then the end keeper sees a reader at the end and writes the end back. Nothing in this test or its page is at fault.
The choice is about the product, and #6116 left it open by keeping 80 ms:
Keep the 80 ms. Then this case asserts a guarantee the product doesn't give a starved Firefox. The test would allow one lost trial in Firefox. Before aimScroll, every trial lost the key, so the test would still catch that regression. Wheel up and plain PageUp in Firefox share the same exposure; they just haven't failed yet.
Keep a reader's sequence open while awaitsReader holds, until the box moves or a longer backstop expires. This is narrower than ending on scrollend alone: aimScroll already knows the input heads up and where it found the box, so only an input that can still move the box would wait. The cost is that an input that moves nothing, such as a wheel up at the top, holds the keeper off for the backstop, and Hold the reading place until widgets finish preparing, and end a landed glide's scroll at its last frame #6116 measured delays of up to 800 ms.
Reproduction
On main at fb3129611, a 4-core runner:
foriin 1 2 3 4;do taskset -c 0 sh -c 'while :; do :; done'&done
taskset -c 0 uv run pytest 'tests/browser/widgets/test_workspaces_and_bounds.py::test_a_page_up_in_a_log_a_stream_feeds_leaves_its_end' -k 'firefox and link' -p no:randomly
The probe went into inSequence's quiet callback, just before endSequence(box) runs after the spell: if (sequence.reader && awaitsReader(box)) (globalThis.lfLost ??= []).push(performance.now()). Each trial's reading also recorded the length of lfLost, which was reset before each trial, and the probe runs used 24 trials per run instead of 6.
The Nov 17 scheduled run 44068597322 (2aabb5436, starved test-macos) lost the same trial in Chromium: test_a_page_up_in_a_log_a_stream_feeds_leaves_its_end[browser-PageUp on a link] failed on macOS with [{'short': 2658, 'across': 0}, {'short': 2498, 'across': 0}, {'short': 0, 'across': 0}, {'short': 2699, 'across': 0}, {'short': 2377, 'across': 0}, {'short': 2618, 'across': 0}]. One trial sits at the log's end and the rest are about 2,500 px up, the shape this issue reproduced in Firefox. The Firefox PageUp cases were non-strict expected failures since #6197, and the Chromium u, PageUp and wheel cases passed. So the loss in a starved run isn't specific to Firefox.
Decision: don't let the cases allow one lost trial of six. Mark Chromium's PageUp, PageUp on a link, wheel and wheel across cases as non-strict expected failures, as #6197 did for Firefox, with #6348 as the reason. #6348 tracks improving the code or the test so that both browsers' marks can go.
This was written by Claude Code on behalf of max-sixty
Applied in #6350: Chromium's PageUp, PageUp on a link, wheel and wheel across cases are now non-strict expected failures with #6348 as the reason, alongside Firefox's. u stays strict. Merging it closes this issue.
Activity
leaf-agent commentedon Nov 16, 2026
Reproduced, and the quiet spell is the cause. This needs a maintainer decision, so I'm assigning it to @max-sixty.
With Firefox and the test pinned to one core shared with busy loops, the test failed in 1 of 6 runs under two loops and 1 of 10 under four. Each failure had the CI shape: one trial at the log's end and the rest about 2700 px up. To check the hypothesis, a temporary probe in
arrivals.jscounted each time the 80 ms spell (SETTLE_MS) ended a sequence thatstartReaderScrollhad started whileawaitsReaderstill held. In other words, the reader's scroll ended before the box moved. Six runs of 24 trials each, all under four loops, made 144 trials:So the loss is the one #6116 weighed and accepted: a starved Firefox applies the key's scroll after the spell has ended the reader's sequence, then the end keeper sees a reader at the end and writes the end back. Nothing in this test or its page is at fault.
The choice is about the product, and #6116 left it open by keeping 80 ms:
aimScroll, every trial lost the key, so the test would still catch that regression. Wheel up and plain PageUp in Firefox share the same exposure; they just haven't failed yet.awaitsReaderholds, until the box moves or a longer backstop expires. This is narrower than ending onscrollendalone:aimScrollalready knows the input heads up and where it found the box, so only an input that can still move the box would wait. The cost is that an input that moves nothing, such as a wheel up at the top, holds the keeper off for the backstop, and Hold the reading place until widgets finish preparing, and end a landed glide's scroll at its last frame #6116 measured delays of up to 800 ms.Reproduction
On
mainatfb3129611, a 4-core runner:The probe went into
inSequence'squietcallback, just beforeendSequence(box)runs after the spell:if (sequence.reader && awaitsReader(box)) (globalThis.lfLost ??= []).push(performance.now()). Each trial's reading also recorded the length oflfLost, which was reset before each trial, and the probe runs used 24 trials per run instead of 6.leaf-agent commentedon Nov 17, 2026
The Nov 17 scheduled run 44068597322 (
2aabb5436, starvedtest-macos) lost the same trial in Chromium:test_a_page_up_in_a_log_a_stream_feeds_leaves_its_end[browser-PageUp on a link]failed on macOS with[{'short': 2658, 'across': 0}, {'short': 2498, 'across': 0}, {'short': 0, 'across': 0}, {'short': 2699, 'across': 0}, {'short': 2377, 'across': 0}, {'short': 2618, 'across': 0}]. One trial sits at the log's end and the rest are about 2,500 px up, the shape this issue reproduced in Firefox. The Firefox PageUp cases were non-strict expected failures since #6197, and the Chromiumu,PageUpand wheel cases passed. So the loss in a starved run isn't specific to Firefox.max-sixty commentedon Nov 18, 2026
Decision: don't let the cases allow one lost trial of six. Mark Chromium's PageUp, PageUp on a link, wheel and wheel across cases as non-strict expected failures, as #6197 did for Firefox, with #6348 as the reason. #6348 tracks improving the code or the test so that both browsers' marks can go.
leaf-agent commentedon Nov 18, 2026
Applied in #6350: Chromium's PageUp, PageUp on a link, wheel and wheel across cases are now non-strict expected failures with #6348 as the reason, alongside Firefox's.
ustays strict. Merging it closes this issue.