Skip to content

Three browser tests failed once each in main push runs on Nov 12: a diff row's focus, a Firefox module-load warning, the threads view's u scroll #5883

Closed

Description

@leaf-agent

Three browser tests each failed once in main's ci push runs on Nov 12, and none failed in the other push runs from Nov 11–12:

  • tests/browser/widgets/test_diffs.py::test_a_changed_diff_file_keeps_its_sideways_reader, run 43141684234 (d9a8a0850): assert before["focus"] is not None at test_diffs.py:737. The diff's shadow root had no focused datum row after the test set the row's scrollLeft and the scroll settled. That run is Keep the page's reading by part, so a load or a gesture reads only the documents it needs #5570's first, so this may connect to the shadow-tree marking regression in the sibling cause issue from the same report. It didn't recur in the next run.
  • tests/browser/widgets/test_code_and_documents.py::test_a_long_text_document_draws_the_lines_in_view_and_keeps_the_rest_whole[firefox_browser], run 43141684234: the test passed, then errored at teardown (_harness.py:1416) on a Firefox console warning, Loading failed for the module with source "…/revisions/r1-…/…/check…".
  • tests/browser/test_render_floating_panel.py::test_keys_in_threads_act_on_threads, run 43160228596 (d5f181825): page.wait_for_function timed out at line 1966, waiting for the threads view to scroll back to scrollTop === 0 after u, which follows a d that did scroll it.

None of the three has been reproduced locally yet. Each needs its junit record across earlier runs (gh run download <run> -p 'pytest-results-*') to tell a race from a regression.

Cause of a failure tracked in #3985.

Activity

  1. added
    tend-ci-cause
    on Nov 12, 2026
  2. leaf-agent commented on Nov 12, 2026

    @leaf-agent
    CollaboratorAuthor

    The diagnosis is still partial. I reproduced the mechanism behind the Firefox teardown warning, but I couldn't reproduce the other two. All three remain intermittent: across the junit records of the 27 ci runs on main from Nov 9 to 12, each test failed only in the run named above. test_a_changed_diff_file_keeps_its_sideways_reader also failed with the same assert None is not None on macOS in the Nov 7 scheduled run (#5711), before #5570 landed, so #5570 didn't cause it.

    Firefox module-load warning: mechanism reproduced. About 300 ms after the page goes quiet, the runtime imports /checks/view.js and its dependencies (user-view.js, scheduled at L204-L210). If a test navigates the page while that import is still in flight, Firefox logs Loading failed for the module … for each aborted module, and the browser fixture counts it as a problem. A probe that opened a plain Leaf page in Firefox and called page.reload() after open_page logged the warning on every reload made 300, 350 or 400 ms after the page was ready, and on none made at 0, 150, 500 or 700 ms. The long-text-document test reloads right after its second comment is sent, and the CI warning fits a reload that landed inside that window: the module named is checks/view.js, imported from runtime/user-view.js. The product isn't at fault. This is noise the test makes by navigating, and it can hit any of the 64 page.reload() calls under tests/browser/ that run on Firefox. So I haven't patched the one test. The fix that matches tests/AGENTS.md's Test-made noise and the precedent of render_harness.restarting is a reload span in the harness: problems the departing document raises between the test's navigation and the new page's readiness belong to the navigation. The other option is one more allowed wording, which that section warns against.

    Diff row's focus: not reproduced. It passed 36 local copies under leaf-dev flake (18 at --cpu-throttle 8, 18 at 20). Locally, the three ] presses land on app/handlers.py's hunks at lines 1, 40 and 80. CI's picture of the failure shows the window on app/routes.py's hunk at line 200, with no row wearing the focus band. So in that run the hunk walk (stepHunk) went one hunk further, and focus ended up somewhere that isn't a datum row. The test presses ] three times without waiting between presses, and each step is async (openEntry, then retainUserIntent). A step that reads hereNode() before the previous step has landed is the likely suspect, but I haven't shown it. Next experiment: hold the first step's openEntry and press the next ] while it waits.

    Threads view's u: not reproduced. It passed 18 local copies at --cpu-throttle 8. The test waits only for scrollTop > 0 after d, so u arrives during d's glide. That should still work, because a step measures from the glide's goal (scrollGoal, scrolling.js). I ruled out u's other binding, "first unread": the fixture has no agent replies. The CI run left no picture for this test.

    The next actions are the harness reload span for the Firefox warning and the held-openEntry experiment for the diff walk.

  3. leaf-agent commented on Nov 13, 2026

    @leaf-agent
    CollaboratorAuthor

    More single-run failures in the ci push runs on main from 43172505092 through 43305728764. Each failed once across those seven runs:

    • test_a_changed_diff_file_keeps_its_sideways_reader failed again in 43273030391 (66eda3190) with the same assert None is not None. That makes 2 of the 16 push runs since Nov 12.
    • test_render_playwright_trace.py::test_trace_comparison_pairs_authored_results_across_delayed_sources: Locator.click timed out in 43172505092.
    • test_render_reactions.py::test_a_visual_action_follows_its_own_scroller_even_when_the_target_is_gone: Locator.focus timed out in 43172505092.
    • test_render_anchors.py::test_a_removed_subject_keeps_its_thread_open_and_detached in 43200186661: thread 'abf328d4' has no current anchor to detach (no-anchor).
    • test_render_semantic_selection.py::test_the_panel_only_hides_targets_in_the_lane_it_paints errored in teardown in 43298024897: unchanged write: data-lf-presses on leaf-floating-panel.
    • navigation/test_obligation_walk.py::test_obligations_sharing_context_keep_their_source_identity in 43305728764: assert 'open' == 'answered'.

    #5827's test_any_focus_on_a_note_rings_its_block_and_follows_it_redrawn also failed again in 43273030391, with Locator expected to have attribute ''.

    None of these has been diagnosed. The deterministic failures in these runs have their own issues: #5914, #5915, #5916, #5917, #5919.

  4. leaf-agent commented on Nov 14, 2026

    @leaf-agent
    CollaboratorAuthor

    More failures in main's ci push runs 43382566871 (54fc546c0) through 43552441399 (624c282d5). Each failed once in those four runs:

    • navigation/test_obligation_walk.py::test_obligations_sharing_context_keep_their_source_identity failed again with assert 'open' == 'answered' (test_obligation_walk.py:681) in 43382566871. That is its second failure, after 43305728764. Both times the answer pressed with 1 didn't reach the log as answered.
    • widgets/test_diffs.py::test_a_changed_diff_file_keeps_its_sideways_reader failed with the same assert None is not None (test_diffs.py:737) in 43402040361. That is its third failure in push runs since Nov 12.
    • New: controls/test_merge_film.py::test_merge_film_terminal_seeks_to_the_result_it_reports[390] passed and then errored at teardown in 43398147734 with unchanged write: data-lf-more-below on div in details.film-phone-terminal.
    • New: test_render_floating_panel.py::test_a_thread_s_keys_answer_in_its_view failed in 43402040361 with the page never sent the undo (render_harness.py:835). The wait started and ended at sends=2 acked=2 pending=0.

    None of these has been diagnosed or reproduced yet.

  5. leaf-agent commented on Nov 14, 2026

    @leaf-agent
    CollaboratorAuthor

    test_keys_in_threads_act_on_threads failed a second time, in run 43577187510 (6cfc59a83). It shows the same diagnostic as before: d scrolled the threads view, then page.wait_for_function("box => box.scrollTop === 0", …) timed out after 120 s waiting for u to scroll back (now test_render_floating_panel.py:1965). It passed in the two push runs just before, 43569152903 (1b062341e) and 43574574535 (cf91bc867), so it is intermittent, not a new regression.

  6. leaf-agent commented on Nov 14, 2026

    @leaf-agent
    CollaboratorAuthor

    test_obligations_sharing_context_keep_their_source_identity failed a third time, now on macOS, in scheduled run 43587194195 (6cfc59a83). The message is the same: assert 'open' == 'answered' at test_obligation_walk.py:681. It passed in that run's Linux job.

  7. leaf-agent commented on Nov 14, 2026

    @leaf-agent
    CollaboratorAuthor

    test_obligations_sharing_context_keep_their_source_identity failed a fourth time, in push run 43619153073 (35a922f56), the first push run after the macOS failure above. It is the same assert 'open' == 'answered' at test_obligation_walk.py:681. With failures in three Linux push runs and one macOS scheduled run, this one no longer fits a rare one-off.

  8. leaf-agent commented on Nov 14, 2026

    @leaf-agent
    CollaboratorAuthor

    test_a_changed_diff_file_keeps_its_sideways_reader failed again in push run 43636276348 (c7d0076f0), with the same assert None is not None on before["focus"] (now at test_diffs.py:738). It passed locally with -n0 on both 830e7ae45 and 2d35c9e42, so it remains intermittent.

  9. leaf-agent commented on Nov 15, 2026

    @leaf-agent
    CollaboratorAuthor

    test_obligations_sharing_context_keep_their_source_identity failed a fifth time in push run 43644692490 (f11c8cff5), with the same assert 'open' == 'answered' at test_obligation_walk.py:681.

  10. leaf-agent commented on Nov 15, 2026

    @leaf-agent
    CollaboratorAuthor

    test_a_visual_action_follows_its_own_scroller_even_when_the_target_is_gone failed a second time in push run 43734784857 (afbc28628). The call log matches its first failure in 43172505092: Locator.focus: Timeout 120000ms exceeded while waiting for get_by_role("button", name="Respond to Start request") at test_render_reactions.py:1652, immediately after the test narrows #flow to 100px. The visual's "Respond to…" proxy never got that name within two minutes. The only commit since the previous push run, #6046, changes tests only and doesn't touch this file.

  11. leaf-agent commented on Nov 16, 2026

    @leaf-agent
    CollaboratorAuthor

    test_a_changed_diff_file_keeps_its_sideways_reader failed again in push run 43835820738 (891a46b8b) with the same assert None is not None on before["focus"] at test_diffs.py:738.

  12. leaf-agent commented on Nov 17, 2026

    @leaf-agent
    CollaboratorAuthor

    Where the issue stands after this run: one test has a fix on main, one has a test-ordering PR open, and the rest stay undiagnosed. I scanned the junit results of the 25 completed ci runs on main from 43734784857 (Nov 15) through 44026724181 (Nov 17).

    Diff walk: explanations ruled out locally
    • A press arriving before the previous step lands: ArrowRight and three ] dispatched in one task land on hunk 1 only, because each newer press supersedes the earlier step. This race gives fewer steps, never the extra one CI showed.
    • The click leaving the file open: skipping the click and pressing ArrowRight then ] ×3 still lands on 1, 40 and 80.
    • A file without hunk heads when a step reads it: both files are loaded (entry.loaded, with 18 and 6 rendered lines) at open, after the click and after ArrowRight, and show() runs once per load.
    • 18 copies under leaf-dev suite flake --cpu-throttle 12 all passed, and so did 18 at --cpu-throttle 8 with test: settle Tab's scroll before refocusing the diff header in the sideways-reader test #6279's waits.

    Since all three are ruled out, focus was most likely already inside hunk 1 before the first ], or something on CI moved it there. Nothing in the setup (click, Tab, focus(), ArrowRight) does that locally. The next useful evidence is the press #6279 names when the failure next recurs.

  13. leaf-agent commented on Nov 17, 2026

    @leaf-agent
    CollaboratorAuthor

    test_keys_in_threads_act_on_threads failed a third time, in push run 44079308608 (518b9f4b0), with the same diagnostic: d scrolled the threads view, then page.wait_for_function("box => box.scrollTop === 0", …) timed out after 120 s waiting for u to scroll it back (now test_render_floating_panel.py:1972). It passed in the two push runs just before, 44050787850 and 44061477709, so it is still intermittent. That run's pytest-results-* artifact holds the failing page's picture.

  14. leaf-agent commented on Nov 18, 2026

    @leaf-agent
    CollaboratorAuthor

    test_keys_in_threads_act_on_threads now has a diagnosed cause and a fix in #6364. The other open tests here, the diff sideways reader and the visual action's Locator.focus timeout, are untouched and still undiagnosed.

    Cause. A scroll glide aimed at fractional positions. Since #5806, setScroll skips any write that lands within a pixel of where the box stands, so a glide could end a pixel off its goal. In the threads view, a page step of about 159.7px leaves d's glide at 160. u, pressed after that glide lands, then aims for 0.3, and its last frame leaves the view at scrollTop 1. The test's wait for scrollTop === 0 therefore never finishes. On CI the press only sometimes arrives after d has landed, which is why the test passed in the runs around each failure. The failing picture from run 44079308608 matches a locally rendered view at scrollTop 1, not 0 (1,499 differing pixels against 11,477). #5806 landed on Nov 11, the day before the first failure.

    Fix. #6364 rounds a glide's goal and each frame's write to whole pixels, so the last write always moves the box onto the goal. A new runtime test drives the glide's frames over a box that snaps to whole pixels; it ends at 1 before the change and at 0 after it. In a 1440×503 window, d then u stopped at 1 in 2 of 4 tries before the change and 0 of 4 after it. Its CI and landing are with tend-land.

  15. leaf-agent commented on Nov 18, 2026

    @leaf-agent
    CollaboratorAuthor

    test_a_changed_diff_file_keeps_its_sideways_reader failed again in push run 44304305274 (90ec76548), on a commit that contains #6279. So waiting for Tab's scroll to settle didn't remove the failure.

    The new per-press wait now names where it goes wrong: the first ]. expect(...).to_be_focused() on app/handlers.py's line 1 row (test_diffs.py:734) timed out after 120 s with the row inactive. The end state matches the earlier failures. In the aria snapshot, app/handlers.py is a closed group with no region, and app/routes.py's region is open from line 200. So ArrowRight still didn't open the first file, and ] walked on to the next file's hunk. Whatever drops the header's focus or its open happens after Tab's glide has settled, so the let-go during that glide that #6279 identified isn't the only route to this state. The run's pytest-results-* artifact holds the failing page's picture.

  16. leaf-agent commented on Nov 18, 2026

    @leaf-agent
    CollaboratorAuthor

    test_a_changed_diff_file_keeps_its_sideways_reader failed again, in push run 44372267125 (63535798b). The diagnostic matches the previous failure: on the first ], app/handlers.py's line 1 row stays inactive (test_diffs.py:734). The aria snapshot again shows app/handlers.py as a closed group, with app/routes.py's region open, so ArrowRight didn't open the first file before ] walked on.

  17. leaf-agent commented on Nov 19, 2026

    @leaf-agent
    CollaboratorAuthor

    test_a_changed_diff_file_keeps_its_sideways_reader now has a reproduced cause and a fix in #6500. The test's setup clicked the first file's header, which closes the file with an animated fold. While that fold runs, the header stays pinned on screen. scroll_settled doesn't wait for the fold, since it moves no scroll, so the test's focus() saw the header on screen and didn't scroll. When the fold ended, the header sat above the window, so ArrowRight let go of it instead of opening the file, and ] walked into app/routes.py. That matches every failure here, including the two after #6279.

    The failure reproduced on current main in 8 of 12 local runs. #6500 focuses the header directly, since both files start open, and keeps what the test protects. It passed 10 of 10 local runs and 18 of 18 copies at --cpu-throttle 8. Its CI and landing are with tend-land, and it refs this issue rather than closing it.

    None of this issue's tests failed in the three red push runs on main since the last update (44432842638, 44445204827, 44455882413). Two remain open and undiagnosed: test_a_visual_action_follows_its_own_scroller_even_when_the_target_is_gone (two Locator.focus timeouts) and the single-run failures listed on Nov 13–14. No failure of test_keys_in_threads_act_on_threads has been reported since #6364 merged, and no recurrence of the Firefox module-load warning.

  18. leaf-agent commented on Nov 20, 2026

    @leaf-agent
    CollaboratorAuthor

    #6500's fix for test_a_changed_diff_file_keeps_its_sideways_reader holds so far. That leaves the visual action's Locator.focus timeout as the open item here with a recurrence.

    I scanned the junit results of every ci run on main after #6500 merged that reached its tests: the 10 failed push runs from 44490813822 (7d301aa7a) through 44666096308 (9114f0fdf), plus scheduled run 44509509454 (8512ab218, Linux and macOS). Every other push run in that window was cancelled before its tests ran. None of this issue's tests failed in those runs:

    Visual action's Locator.focus timeout: still undiagnosed. It has failed twice in total, most recently on Nov 15, and passed in all 11 runs here. It passed 12 of 12 local copies under leaf-dev suite flake --cpu-throttle 8 on 6b73bf267.

    What the failure picture rules out, and the next experiment

    The picture from 43734784857 shows the diagram drawn again for the 100px box, with "Start request" wrapped over two lines. So the redraw the test waits for happened, and the wait for two tspans passed. What never showed up was a button named Respond to Start request.

    The name comes from wordsOf in packages/diagram/widgets/lf-diagram.js. It adds a space only where a run's y differs from its line's. So the proxy is either missing, or has a different name (for example Startrequest from runs without their own y), or Playwright doesn't see it in the accessibility tree.

    The next experiment is to have the test, when the lookup fails, read every .lf-visual-action's textContent and the diagram's visualParts labels. That would say which of the three it is.

  19. leaf-agent commented on Nov 21, 2026

    @leaf-agent
    CollaboratorAuthor

    Closing: every failure this issue tracks with a recurrence now has a merged fix, and the last open item, the visual action's Locator.focus timeout, was fixed by #6059 before this issue's previous update.

    Visual action's timeout: fixed by #6059. Both failures ran on commits without #6059: 43172505092 (b3387f111) and 43734784857 (afbc28628). The narrow drawing named its control Respond to Startrequest, so the test's lookup for Respond to Start request never matched. #6059 makes wordsOf keep the space where a label wraps, and makes the test wait for the narrow drawing before pressing. The previous update here read the Nov 15 picture against the current test, which has that wait. The test that failed on Nov 15 didn't have it yet. The test passed in every ci run on main after 43734784857.

    Test Fix
    test_obligations_sharing_context_keep_their_source_identity #5978
    test_keys_in_threads_act_on_threads #6364
    test_a_changed_diff_file_keeps_its_sideways_reader #6500
    Firefox Loading failed for the module teardown warning #6509: the fixture now counts the warning only where that module's request also failed, so a reload cutting off an in-flight import isn't counted
    test_a_visual_action_follows_its_own_scroller_even_when_the_target_is_gone #6059

    Since the previous update. I read the junit of all six red ci runs on main since Nov 20 06:43 UTC: scheduled run 44722728605, and push runs 44799579467, 44808763809, 44843074595, 44855107814 and 44859344032. None of the tests above failed in them, and they passed in the green runs between.

    test_a_removed_subject_keeps_its_thread_open_and_detached failed in 44799579467 and 44808763809 with a different error. It was one of about ten test_render_anchors.py tests that hit strict mode violation: locator(".lf-thread-quote-head") resolved to 2 elements in those two runs. That is a separate cause, not this issue's no-anchor, and it passed in the later runs.

    The Nov 13–14 single-run failures were never diagnosed: trace comparison, panel lane's data-lf-presses, merge film's data-lf-more-below and a thread's keys' undo. None has recurred since. If one does, the lane's failure report will bring it back with its new run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tend-ci-cause

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions