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
Document scroll, feature-gallery quoting and a feature-gallery render-gate hang each fail once, only on macOS, in the Nov 22 full-tier dispatch #6807
These three tests failed only in the test-macos job of full-tier cirun 45073646401 on 3c9424f48 (a workflow_dispatch). The Linux test job ran them in the same run and passed them. The previous full-tier dispatch, 45044712114 on 89b4d28d8, passed all three on macOS. The range 89b4d28d8..3c9424f48 holds nine commits, and none of them obviously touches these paths. The failures haven't been reproduced or bisected. As running-tend's A red ci on main is live says, the next step is to dispatch each test alone on the macOS runner and see which fail every time.
Page.wait_for_function: Timeout 120000ms exceeded at line 342, waiting for the source tabpanel's scrollTop > 0 after PageDown while that panel holds focus
1 passages in feature-gallery quote text the page can't find: ['“The current page replaces the old release plan. Its earlier quotation'], a passage that ends inside the agent's reply bg-retained-quote-reply in examples/developer/feature-gallery.jsonl
worker gw2 hit pytest's 30-minute timeout and crashed. At the timeout, the page server's thread was in samples.create → revisioning.activate_source → revision_artifact.capture_artifact → _capture_input_stamps, which walks the page's page/ and media trees with rglob
Two of the three run on feature-gallery. The sample-creation stack suggests that a live sample's POST stalled the render gate. That reading is unconfirmed: the dump shows where the thread was at one moment, not that it was stuck there.
Two of the three failures reproduce on current main (017ddeccf) on the macOS runner. The quoting failure does not. None of them is fixed yet, and the issue stays open for the next diagnostic run.
Document scroll: the browser's PageDown glide on the source panel ends without moving. An instrumented copy (45102502610, 1 of 36 failed) recorded the panel just before and after the key press. Focus was on the source tabpanel. The panel could scroll: scrollHeight was 1448 and clientHeight 240. PageDown's keydown was not defaultPrevented. Even so, the panel fired a scrollend 260 ms later with scrollTop still 0, and no scroll event came before it. A scrollend with no scroll before it means the browser started the glide and something ended it before its first frame moved the box. A script that writes the panel's own position, as stopWhereItStands or a place keeper's restore in browser/runtime/arrivals.js and scrolling.js can, would end the glide this way. lf-text-document.js and lf-tabs.js never write the panel's scrollTop. Which code wrote it is still unknown. A follow-up run that hooked every scrollTop and scrollTo write on the panel to record its stack (45103731119) passed all 54 copies, so it caught no write. At about 1 in 27, 54 passes happen by chance about 13% of the time, so that run neither confirms the write nor rules it out.
Render gate: the test waits on the page without end; the server isn't stuck. When the hung copy timed out, its page server was serving a live sample's request (http._sample_request → served_state.service.revision → revision_artifact.read_revision). In the original run's dump it was in revisioning.activate_source → capture_artifact. Two different frames, so the server is still working, and the "stall in _capture_input_stamps" reading in the report doesn't hold. Pytest's main thread was inside Playwright's event loop, and the greenlet hides which test call it was waiting in. Some step of the gate or a journey waits on the page with no timeout and never returns.
Quoting: not reproduced in 18 copies under load. The one failure is still the only evidence.
Next steps:
Scroll: run the write hook again with more copies. If it still catches nothing, also log scrollend on the page scroller and the iframe, to see whether a glide stopped elsewhere also stands the panel's glide down.
Render gate: run copies with a per-call Playwright timeout, so a hang fails at the call that waits instead of at pytest's 30-minute limit.
The scratch branches have been deleted. The instrumentation was a page.evaluate that logs keydown, keyup, scroll and scrollend on the panel (and, in the second run, wraps Element.prototype.scrollTop's setter and scrollTo/scroll/scrollBy), placed just before the source panel's PageDown in tests/browser/widgets/test_code_and_documents.py.
No script stops the source panel's PageDown glide. The browser ends that glide on its own before the panel moves, and waiting for a rendering update before the press doesn't prevent it. Nothing is fixed yet, and the issue stays open because the scroll failure reproduces reliably enough to keep diagnosing.
45140596242, 108 copies, rendered(page) before PageDown
document scroll
1 of 108 failed, same wait
Document scroll. The 108-copy run hooked every scroll and focus write a script could make: the setters for scrollTop/scrollLeft, scrollTo/scroll/scrollBy/scrollIntoView on elements and on window, and focus. It also logged scroll/scrollend on the page and the iframe, mutations and resizes of the panel, and long animation frames with their script attribution. All five failures read the same way:
Focus is on the source panel, which can scroll (scrollHeight 1448, clientHeight 240). PageDown's keydown is not defaultPrevented.
No script writes any scroll position or focus, nothing mutates the panel, and nothing else on the page or in the iframe scrolls.
The panel fires scrollend 100 to 1200 ms later with scrollTop 0, and no scroll event comes before it.
The frame that holds the key press runs 260 to 1220 ms, mostly in requestAnimationFrame callbacks of 100 to 190 ms. After it the page keeps producing 50 to 130 ms frames, with no script in them, for the whole 15 s wait.
So the earlier suspicion of stopWhereItStands or a place keeper's restore doesn't hold: Leaf's code never touches the panel. I next guessed that the press came before the compositor knew the newly shown panel could scroll. Waiting for rendered(page) between the focus and the press tests that guess, and it still failed 1 time in 108. The drop from 5 to 1 is within chance at these counts, so the guess is neither confirmed nor ruled out.
What's still open:
Continuous frames. The page goes on rendering for 15 s with no script running and nothing scrolling. If something on this small page invalidates rendering every frame, it would explain the starved glide, and it would be a product cost of its own. The next run should log what changes each frame, such as running animations from document.getAnimations().
No baseline from passing copies. Their stdout isn't kept, so I can't yet compare them with the failures. The next run should write each copy's log to .tmp/flake/.
Render gate. 0 of 12 this time, so 1 of 18 across both runs. The 12-copy run logged every Playwright call and reply to a file, so a hang would have named the call that never returned, but none hung. The one hang so far still has no location. The cheapest durable capture is to log the in-flight Playwright call when pytest-timeout fires, for every test in the suite, since the greenlet hides it from the stack dump.
Quoting. Not run again. It is still 0 of 18 since the original failure.
Instrumentation, for the next run
The scroll probe was a page.evaluate placed between expect(source_panel).to_be_focused() and the source panel's PageDown in tests/browser/widgets/test_code_and_documents.py. It wrapped the element and window scroll setters and methods and HTMLElement.prototype.focus, recording each call's stack. It added capturing keydown/keyup/scroll/scrollend listeners on the panel, plus scroll/scrollend on document and the iframe's document, a MutationObserver and ResizeObserver on the panel, and a PerformanceObserver for long-animation-frame. The wait was cut to 15 s, and on timeout the test printed the log. The render-gate probe wrapped Transport.serialize_message and Connection.dispatch in playwright._impl and wrote SEND/RECV lines to .tmp/flake/pwcalls-<pid>.log. The scratch branches (repro/issue-6807-c, -d, fix/issue-6807) are deleted.
I'm closing this as waiting on a recurrence. None of the three failures has a step left that a session can take before its next failure. All three passed in scheduled run 45159811021 on c8ab9ec1d on both macOS and Linux. #6982 adds the dump the render-gate hang was missing, and tend-land has its CI and landing.
Test
Copies on the macOS runner so far
What its next failure should show
document scroll [html-authored-height]
8 of 432 failed across six dispatches. 0 of 108 failed in today's 45342415166 on 85d756311
whether a second PageDown scrolls the panel
test_page_fixture_renders[feature-gallery]
1 of 18 hung
with #6982, the stack of the test call it waits in
the passage it fails to find, which the existing message already prints
Document scroll. Earlier runs showed that no Leaf script writes the panel's scroll position. The browser itself ends the PageDown glide before the panel moves. In 45127427697 the probe also attached a ResizeObserver to the panel, which reports its first size at the next rendering update. In the two failing copies I read, that report arrived 290 and 1110 ms after the key press, so no rendering update ran between focusing the panel and pressing the key. A starved main thread is the reading that fits. I haven't confirmed it, but the compositor may not yet know the newly shown panel can scroll.
Today's dispatch tested that reading. When the first press didn't move the panel within 8 s, it pressed PageDown again. A second press that scrolls would mean the first was lost to timing, not that the panel can't be scrolled. No copy failed, so the run settled neither. Across all six dispatches the failure rate is about 1 in 54, so 108 straight passes happen by chance about 13% of the time. Once it recurs, apply that same re-press check to the failing copy.
Render gate. The one hang left no location. faulthandler's dump only shows OS threads, and Playwright's sync API keeps the test's own frames in a suspended greenlet. After #6982 merges, the timeout's output will also carry each greenlet's stack, ending at the line whose call is waiting.
Today's scroll probe, for the next run
Put this between expect(source_panel).to_be_focused() and the source panel's PageDown in tests/browser/widgets/test_code_and_documents.py. It is a page.evaluate that logs scroll, scrollend and keydown on the panel, plus the panel's scrollTop on every animation frame. The wait for scrollTop > 0 is cut to 8 s. On timeout, the probe presses PageDown again, waits 8 s more, and fails with DBG6807 first PageDown lost; SECOND-PRESS-SCROLLED or SECOND-PRESS-STILL-ZERO, printing the log. The per-frame requestAnimationFrame loop makes the page render every frame, and that may have hidden the failure itself. A next probe should drop that loop. The scratch branch repro/issue-6807-e is deleted.
Activity
test: instrument #6807 source-panel PageDown (diagnostic branch)
test: log scroll writes to the source panel (#6807 diagnostic)
leaf-agent commentedon Nov 23, 2026
Two of the three failures reproduce on current
main(017ddeccf) on the macOS runner. The quoting failure does not. None of them is fixed yet, and the issue stays open for the next diagnostic run.017ddeccftest_document_readings_share_a_stable_viewport_and_keep_their_scroll[html-authored-height]--load 4scrollTop > 0test_real_page_passages_can_be_quoted[feature-gallery]test_page_fixture_renders[feature-gallery]Document scroll: the browser's PageDown glide on the source panel ends without moving. An instrumented copy (45102502610, 1 of 36 failed) recorded the panel just before and after the key press. Focus was on the source tabpanel. The panel could scroll:
scrollHeightwas 1448 andclientHeight240.PageDown'skeydownwas notdefaultPrevented. Even so, the panel fired ascrollend260 ms later withscrollTopstill 0, and noscrollevent came before it. Ascrollendwith noscrollbefore it means the browser started the glide and something ended it before its first frame moved the box. A script that writes the panel's own position, asstopWhereItStandsor a place keeper's restore inbrowser/runtime/arrivals.jsandscrolling.jscan, would end the glide this way.lf-text-document.jsandlf-tabs.jsnever write the panel'sscrollTop. Which code wrote it is still unknown. A follow-up run that hooked everyscrollTopandscrollTowrite on the panel to record its stack (45103731119) passed all 54 copies, so it caught no write. At about 1 in 27, 54 passes happen by chance about 13% of the time, so that run neither confirms the write nor rules it out.Render gate: the test waits on the page without end; the server isn't stuck. When the hung copy timed out, its page server was serving a live sample's request (
http._sample_request→served_state.service.revision→revision_artifact.read_revision). In the original run's dump it was inrevisioning.activate_source→capture_artifact. Two different frames, so the server is still working, and the "stall in_capture_input_stamps" reading in the report doesn't hold. Pytest's main thread was inside Playwright's event loop, and the greenlet hides which test call it was waiting in. Some step of the gate or a journey waits on the page with no timeout and never returns.Quoting: not reproduced in 18 copies under load. The one failure is still the only evidence.
Next steps:
scrollendon the page scroller and the iframe, to see whether a glide stopped elsewhere also stands the panel's glide down.The scratch branches have been deleted. The instrumentation was a
page.evaluatethat logskeydown,keyup,scrollandscrollendon the panel (and, in the second run, wrapsElement.prototype.scrollTop's setter andscrollTo/scroll/scrollBy), placed just before the source panel'sPageDownintests/browser/widgets/test_code_and_documents.py.leaf-agent commentedon Nov 23, 2026
No script stops the source panel's
PageDownglide. The browser ends that glide on its own before the panel moves, and waiting for a rendering update before the press doesn't prevent it. Nothing is fixed yet, and the issue stays open because the scroll failure reproduces reliably enough to keep diagnosing.main+ instrumentation--load 4[html-authored-height]--load 4test_page_fixture_renders[feature-gallery]rendered(page)beforePageDownDocument scroll. The 108-copy run hooked every scroll and focus write a script could make: the setters for
scrollTop/scrollLeft,scrollTo/scroll/scrollBy/scrollIntoViewon elements and onwindow, andfocus. It also loggedscroll/scrollendon the page and the iframe, mutations and resizes of the panel, and long animation frames with their script attribution. All five failures read the same way:scrollHeight1448,clientHeight240).PageDown'skeydownis notdefaultPrevented.scrollend100 to 1200 ms later withscrollTop0, and noscrollevent comes before it.requestAnimationFramecallbacks of 100 to 190 ms. After it the page keeps producing 50 to 130 ms frames, with no script in them, for the whole 15 s wait.So the earlier suspicion of
stopWhereItStandsor a place keeper's restore doesn't hold: Leaf's code never touches the panel. I next guessed that the press came before the compositor knew the newly shown panel could scroll. Waiting forrendered(page)between the focus and the press tests that guess, and it still failed 1 time in 108. The drop from 5 to 1 is within chance at these counts, so the guess is neither confirmed nor ruled out.What's still open:
document.getAnimations()..tmp/flake/.Render gate. 0 of 12 this time, so 1 of 18 across both runs. The 12-copy run logged every Playwright call and reply to a file, so a hang would have named the call that never returned, but none hung. The one hang so far still has no location. The cheapest durable capture is to log the in-flight Playwright call when
pytest-timeoutfires, for every test in the suite, since the greenlet hides it from the stack dump.Quoting. Not run again. It is still 0 of 18 since the original failure.
Instrumentation, for the next run
The scroll probe was a
page.evaluateplaced betweenexpect(source_panel).to_be_focused()and the source panel'sPageDownintests/browser/widgets/test_code_and_documents.py. It wrapped the element and window scroll setters and methods andHTMLElement.prototype.focus, recording each call's stack. It added capturingkeydown/keyup/scroll/scrollendlisteners on the panel, plusscroll/scrollendondocumentand the iframe's document, aMutationObserverandResizeObserveron the panel, and aPerformanceObserverforlong-animation-frame. The wait was cut to 15 s, and on timeout the test printed the log. The render-gate probe wrappedTransport.serialize_messageandConnection.dispatchinplaywright._impland wroteSEND/RECVlines to.tmp/flake/pwcalls-<pid>.log. The scratch branches (repro/issue-6807-c,-d,fix/issue-6807) are deleted.leaf-agent commentedon Nov 24, 2026
I'm closing this as waiting on a recurrence. None of the three failures has a step left that a session can take before its next failure. All three passed in scheduled run 45159811021 on
c8ab9ec1don both macOS and Linux. #6982 adds the dump the render-gate hang was missing, and tend-land has its CI and landing.[html-authored-height]85d756311PageDownscrolls the paneltest_page_fixture_renders[feature-gallery]test_real_page_passages_can_be_quoted[feature-gallery]Document scroll. Earlier runs showed that no Leaf script writes the panel's scroll position. The browser itself ends the
PageDownglide before the panel moves. In 45127427697 the probe also attached aResizeObserverto the panel, which reports its first size at the next rendering update. In the two failing copies I read, that report arrived 290 and 1110 ms after the key press, so no rendering update ran between focusing the panel and pressing the key. A starved main thread is the reading that fits. I haven't confirmed it, but the compositor may not yet know the newly shown panel can scroll.Today's dispatch tested that reading. When the first press didn't move the panel within 8 s, it pressed
PageDownagain. A second press that scrolls would mean the first was lost to timing, not that the panel can't be scrolled. No copy failed, so the run settled neither. Across all six dispatches the failure rate is about 1 in 54, so 108 straight passes happen by chance about 13% of the time. Once it recurs, apply that same re-press check to the failing copy.Render gate. The one hang left no location. faulthandler's dump only shows OS threads, and Playwright's sync API keeps the test's own frames in a suspended greenlet. After #6982 merges, the timeout's output will also carry each greenlet's stack, ending at the line whose call is waiting.
Today's scroll probe, for the next run
Put this between
expect(source_panel).to_be_focused()and the source panel'sPageDownintests/browser/widgets/test_code_and_documents.py. It is apage.evaluatethat logsscroll,scrollendandkeydownon the panel, plus the panel'sscrollTopon every animation frame. The wait forscrollTop > 0is cut to 8 s. On timeout, the probe pressesPageDownagain, waits 8 s more, and fails withDBG6807 first PageDown lost; SECOND-PRESS-SCROLLEDorSECOND-PRESS-STILL-ZERO, printing the log. The per-framerequestAnimationFrameloop makes the page render every frame, and that may have hidden the failure itself. A next probe should drop that loop. The scratch branchrepro/issue-6807-eis deleted.test: print a hung test's greenlet stacks before the half-hour timeout (