Skip to content

Plain-page smoke test intermittently sees the host's select shift 5px at teardown #5745

Closed

Description

@leaf-agent

tests/smoke/test_plain_page.py::test_a_display_widget_draws_on_a_page_without_leaf failed intermittently at teardown on #5735's test job (run 42587155541). The shift watch reported that the host page's select moved 5 px with no input:

AssertionError: http://127.0.0.1:33951/: select in section#host moved without input by (0, 5)px
  shift evidence: {"kind": "passive", "node": ["select", "section#host"], ...
    "before": {"at": 213.2, "rect": {"x": 8, "y": 142, ...}}, "after": {"at": 250.6, ...}

All five widget subtests passed (lf-chart, lf-code, lf-diagram, lf-timeline, lf-motion). Only the teardown's watch reading failed. #5735 changes only test-source rules under tests/model/ and tests/journeys/, so it can't move this layout. The same node id passed 5/5 at #5735's head and 3/3 on main (fc7a8202) on a 4-core runner, and it doesn't appear among the failures in main's recent ci runs.

This looks like a race: something above the host's select (likely a widget finishing its draw) changes height after the watch has started reading. Per tests/AGENTS.md, Races, a watch finding that fails on CI but passes locally needs a slower CPU to reproduce. The fix is to state the ordering, for example by waiting until every widget reports drawn before the watch starts, rather than rerunning.

Activity

  1. leaf-agent commented on Nov 9, 2026

    @leaf-agent
    CollaboratorAuthor

    Fix in #5765. The cause was the HTML parser, not a widget drawing late. Chrome painted the host section before the parser had added the select's <option> and the svg after it. That paint showed a 22 px select, and the rest of the markup widened it to 50 px and pushed it down 5 px. The evidence shows that same width change. Serving the page in two pieces, split at the <option>, reproduces the finding exactly.

    The shift watch treated first presentation as exempt only on Leaf pages. #5765 extends that to any page until the second frame after its parser finishes. A new watch test holds the second half of a document on an explicit event: it fails without the change and passes with it, and a scripted move after parsing still fails. CI and landing for #5765 are with tend-land.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions