Skip to content

test_an_image_pasted_in_an_open_thread_stands_between_the_thread_and_the_box[key]: panel furniture moves 124 px up without input at teardown #6736

Closed

Description

@leaf-agent

tests/browser/test_render_floating_panel.py::test_an_image_pasted_in_an_open_thread_stands_between_the_thread_and_the_box[key] errored at teardown in run 44999105534 on 1b4807c1d. The shift watch reported three pieces of the panel's furniture, button.lf-fp-back, button.lf-resolve and button.lf-fp-close, moving up 124 px with no input in one frame (top 146 → 22, paint_at 5173 ms). The evidence carries no animation, scroll or carry terms ("animations": [], "scroll_terms": []).

Not reproduced so far. Locally on main 850e0bfb3 it passed 1 of 1 plain and 12 of 12 copies with leaf-dev suite flake --cpu-throttle 4 --workers 3. It didn't fail in the earlier push runs on fac415460, b54a16fc4 or 866f73be9.

Not the same as #6609. #6729 fixed a Back-button shift where the watch misread a re-timed carry. Here the evidence has no carry, so that fix doesn't explain this one.

Possible lead, not yet tested: #6725 (comment box frame lag), #6726 and #6727 (margin card fit) all merged between the last passing run and this one. #6735 reverts #6725 for a separate failure.

Next step: a CI flake dispatch of this test with --load to get a failure rate, then a bisect over #6725 to #6727 if it reproduces.

Cause of a failure tracked in #6734.

Activity

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

    @leaf-agent
    CollaboratorAuthor

    Reproduced locally, and not caused by #6725–#6727. Run alone and one at a time, the [key] case errors with the same three moved without input by (0, -124)px findings in about 40% of runs: 6 of 16 on main a562465e1, and 7 of 16 on 2b15a9ce4, the commit before #6725. The earlier attempts ran concurrent copies under leaf-dev suite flake, and every copy passed. A test-macos flake dispatch on main (36 copies, --workers 2 --load 4) errored in 2 of 36.

    The move is the test releasing its held carry. Once the band opens, .lf-fp-head's layout already stands at 22 px, and box-motion's 300 ms carry (--lf-box-carry: 0px 124px → 0px 0px) draws it back at 146 px. HOLD_MOTION keeps that carry paused at its first frame. The reported 146 → 22 step lands in the frame after the test's __lfHeld.forEach(motion => motion.finish()): in three failing runs, a per-frame probe saw the header reach 22 px within 5 ms of the finding's paint_at. The thread view opened with the header at 146 px and stayed there until the paste, so the thread's opening isn't the move.

    What doesn't separate passing runs from failing ones:

    • In both, the carry begins while the paste's input rendering is still open (lfInputRenderingOpen() is true at every animate call). So the watch should treat it as motion that input began, not as a carry of a step taken without input.
    • In both, the input rendering has closed by the time the test calls finish(), and __lfHeld holds the same nine paused motions.
    • Waiting 600 ms before finish() doesn't change the rate (4 of 8 still failed).

    The cause therefore looks like the shift watch sometimes failing to credit a held effect's release, not a product defect. Finishing a held motion is how tests/AGENTS.md ("Frames, sequences, and instants") says to release one, so the fix belongs in the sensor, not in this test.

    Next step (this issue stays with triage): log the watch's finished-promise read of the .lf-fp-head carry (shift_watch.js readMotion(at, animation)) in passing and failing runs. One thing to check is whether the read runs before or after the audit of the frame that draws the finish. Another is whether the custom-property translation passes the replace and returning filters, which would leave animations: [] in the evidence. Running the case one at a time (uv run pytest -p no:randomly '<node id>' in a loop) reproduces it in a few minutes.

  3. leaf-agent commented on Nov 22, 2026

    @leaf-agent
    CollaboratorAuthor

    The [key] case errored again in the Linux test job of full-tier dispatch 45044712114 on 89b4d28d8. The same three furniture buttons moved without input by (0, -124)px at teardown, consistent with the ~40% local rate above. macOS passed it in the same run.

  4. leaf-agent commented on Nov 23, 2026

    @leaf-agent
    CollaboratorAuthor

    Cause found, fix in #6854. The shift watch missed crediting the carry, as suspected, but the miss is in ownership, not in the finished-promise read. The paste's thumbnail lands through a widget preparation, and the panel head's carry begins in that landing's first ResizeObserver delivery. The watch credited such a carry as it began only for an open input rendering (#6020), not for a landing. A landing collected it at its next tick instead, and when the server's reading landed before that tick (4845 ms carry → 4871 ms reading → 4873 ms tick in a probed failing run), the landing was already sealed. The carry was never owned, so releasing it read as the furniture moving 124 px without input.

    #6854 gives landings the same first-frame delivery credit. A new shift-watch test that forces that order fails 3 of 3 on main and passes with the fix, and the [key] case went from 6 of 20 errors to 0 of 20. The PR's CI and landing are with tend-land, and merging it closes this issue.

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