Repository navigation
Closed
Labels
tend-ci-causeA root cause of a CI failure report
Description
The scheduled run 41432142330 records the following failing boundary. This is CI evidence, not a claim that the failure persists on current main or that its cause is established.
Reconcile current main, existing repairs and active work before reproducing. Diagnose the shared failing operation before choosing a fix; split ownership if reproduction establishes different mechanisms. Preserve the intended behavior from the originating changes and follow the repository’s focused verification, review and landing gates.
tests.browser.widgets.test_motion::test_a_motion_failure_shows_beside_the_study_and_reaches_the_agent — macOS
browser = <render_harness.WatchedBrowser object at 0x10ddaedb0>
serve = <function serve.<locals>.go at 0x10f0fc400>
def test_a_motion_failure_shows_beside_the_study_and_reaches_the_agent(browser, serve):
page = open_page(
browser,
serve(
leaf_page(
"Motion failures",
"""<h1>Motion failures</h1>
<lf-motion id="sketch" duration="1000" aria-label="A sketch that breaks past its start">
<figure id="sketch-study"><svg viewBox="0 0 300 80" role="img" aria-label="Travel">
<circle id="dot" cx="20" cy="40" r="10" /></svg></figure>
</lf-motion>
<lf-motion id="recording" duration="1000" aria-label="A recording that cannot play">
<figure><video muted playsinline width="160" height="90" aria-label="Clip"></video>
</figure>
</lf-motion>""",
head='<script type="module" src="/page/draw.js"></script>',
),
packages=("motion",),
page_files={
"draw.js": """
await customElements.whenDefined('lf-motion');
document.getElementById('sketch').renderFrame = time => {
if (time > 0) throw new Error('the frame broke');
};
"""
},
),
)
# A press the browser refuses to play says so in the clock's place, and the agent
# hears why.
page.evaluate(
"""() => { HTMLMediaElement.prototype.play = () =>
Promise.reject(new DOMException('no source to play', 'NotSupportedError')); }"""
)
recording = page.locator("#recording")
recording.locator(".lf-motion-play").click()
expect(recording.locator(".lf-motion-clock")).to_have_text("Failed")
expect(recording.locator(".lf-motion-play")).to_have_accessible_name("Play")
> consume_browser_errors(page, "Playback failed: no source to play")
/Users/runner/work/leaf/leaf/tests/browser/widgets/test_motion.py:264:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
page = <Page url='http://127.0.0.1:55687/versions/v1.html'>
expected = ('Playback failed: no source to play',)
def consume_browser_errors(page, *expected):
"""Consume the problems a test caused on one page, each of which must be one of
`expected` (`is_problem`)."""
assert expected, "expected browser problems cannot be empty"
errors = take_browser_errors(page)
> assert errors and all(
any(is_problem(error, wanted) for wanted in expected) for error in errors
), shown(errors)
E AssertionError:
E assert ([])
/Users/runner/work/leaf/leaf/tests/render_harness.py:1656: AssertionError
The full tracebacks are in that run’s pytest-results-* JUnit artifacts.
Cause of a failure tracked in #4225.
Metadata
Metadata
Assignees
Labels
tend-ci-causeA root cause of a CI failure report
Activity
leaf-agent commentedon Nov 4, 2026
Fixed by #5351, which merged as 7f8047f. The test read its browser problems too early:
lfDocumentLifetime.whenActivedefers a widget failure's console report to asetTimeout, so it lands a task after the clock already shows "Failed". It now waits for the complete inventory withreported_browser_errors: one playback failure, plus three frame failures, one for each draw that threw. With the report's deferral widened by 300 ms, the old test fails with CI'sassert ([])and the new one passes. Linux CI passed on the PR. The next scheduledtest-macosrun is the after-fix evidence for the macOS job.