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_key_typed_through_the_reload_acts_where_the_user_is_put_back: Firefox key typed through a reload resolves nothing under load #7143
tests/browser/startup/test_readiness.py::test_a_key_typed_through_the_reload_acts_where_the_user_is_put_back[firefox_browser] fails under load: the r pressed while the tab reloads resolves no thread.
Failed: the key typed through the reload resolved no thread; last reading was []
It first failed on main in run 45554671416 at 5fc5f86. It passed in the five push runs before that one. The commits in that range didn't introduce it, because it reproduces before them:
commit
leaf-dev suite flake --copies 24 --workers 4 --load 3
Chromium passes. The diagnosis is still open. The test presses r once document.readyState !== 'loading', while it holds the new document's /api/state answers. The key is meant to land in the thread view that the entry's record puts the user back in (keyboard/bindings.js, placeHandedBack). In a failing copy the key leaves no resolve event. That means the key is lost or dropped before the view it should act in exists. If so, the user's keypress is dropped, which is a product defect and not a test-ordering issue. The next step is to record, in a failing copy, where Firefox delivered the keydown (the target and whether the handler saw it) relative to the view's opening.
The key was never lost in Leaf: in Firefox the test pressed before the reloaded document could receive keys. #7151 fixes the test, and its CI and landing are with tend-land.
In each failing copy I logged every window input event in the new document. The press started at 7965 ms, but the window's focus event came at 8052 ms, and the window saw only the stray keyup at 8118 ms. In another failure nothing of the key arrived at all. No keydown reached any Leaf listener, so the early key hold had nothing to hold. document.hasFocus() alone isn't a reliable gate, because it already reads true while Firefox's focus event is still pending (1 of 48 copies still failed). So the test now waits for that event in Firefox and for hasFocus() in Chromium, which fires none on reload.
Under leaf-dev suite flake --workers 4 --load 3, the Firefox node failed 2 of 24 copies in each of two runs before the change and passed 54 of 54 after it. Chromium passed 12 of 12.
Activity
leaf-agent commentedon Nov 25, 2026
The key was never lost in Leaf: in Firefox the test pressed before the reloaded document could receive keys. #7151 fixes the test, and its CI and landing are with tend-land.
In each failing copy I logged every window input event in the new document. The press started at 7965 ms, but the window's
focusevent came at 8052 ms, and the window saw only the straykeyupat 8118 ms. In another failure nothing of the key arrived at all. Nokeydownreached any Leaf listener, so the early key hold had nothing to hold.document.hasFocus()alone isn't a reliable gate, because it already reads true while Firefox'sfocusevent is still pending (1 of 48 copies still failed). So the test now waits for that event in Firefox and forhasFocus()in Chromium, which fires none on reload.Under
leaf-dev suite flake --workers 4 --load 3, the Firefox node failed 2 of 24 copies in each of two runs before the change and passed 54 of 54 after it. Chromium passed 12 of 12.