Repository navigation
fix: wait for returning widget error reports in browser test - #5108
Merged
Merged
Conversation
Fault reports moved to the next task in #4966 to distinguish native document removal from genuine page faults. The reconnect test read its console records after presentation settled, before the deferred second report arrived. Wait for the console event around each failed draw, retaining both error, repaint and readiness assertions. Closes #5094
This was referenced Nov 3, 2026
max-sixty
pushed a commit
that referenced
this pull request
Nov 4, 2026
…rs (#5312) `test_widget_controller_owns_presentation_across_values_and_lifetimes` intermittently read no browser errors on the scheduled macOS job ([run 41432142330](https://github.com/max-sixty/leaf/actions/runs/41432142330) for `light` and `shadow-child`, [run 41622727492](https://github.com/max-sixty/leaf/actions/runs/41622727492) for `shadow-host`), where it expected the deliberate render failure's `leaf:` report. Since #4966, `reportPageError` writes that report through `lfDocumentLifetime.whenActive`, a task after the fault, so a removed iframe's cancelled requests don't read as page failures. The error box and a settled presentation therefore no longer mean the console has the report, and a test that reads `take_browser_errors` right away races it. Five browser tests read a `leaf:` report this way. They now call `reported_browser_errors`, the harness's existing wait for a named inventory of browser problems, which still requires exactly the reports each test expects (one each, two for the returning widget). The returning-widget test's ad hoc `expect_console_message` wrappers from #5108, which fixed the same race there, are replaced by the same call. No product behavior changes. Verification: with every `leaf:` console report held 300 ms in `layer-client.js` (a local experiment, not committed), five of the seven focused cases fail on the old tests with the reported `[] == [...]` diagnostic, and all seven pass on the new tests, with and without the delay: ``` tests/browser/test_render_application_boundary.py::test_a_returning_widget_repaints_to_restore_subscriptions tests/browser/test_render_application_boundary.py::test_widget_controller_owns_presentation_across_values_and_lifetimes (3 cases) tests/browser/test_render_application_boundary.py::test_thread_presentation_waits_for_its_frozen_widgets_only tests/browser/navigation/test_obligation_walk.py::test_a_failed_obligation_reveal_does_not_register_an_arrival tests/browser/test_render_outbox.py::test_an_optimistic_presentation_fault_does_not_change_delivery_result ``` Closes #5189 — automated triage Co-authored-by: leaf-agent <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The reconnect test read browser errors before the second failure's console report arrived. #4966 intentionally deferred fault reporting until after the native operation, so removing an iframe does not report its canceled requests as page failures; presentation completion no longer implies console delivery.
Wait for the matching console event around each deliberate failed draw. The existing assertions still require two failures, two reports, a reconnect repaint, and no pending presentation work. No product behavior changes.
Validation: the focused
test_a_returning_widget_repaints_to_restore_subscriptionsfailed before this change with the reported one-versus-two mismatch and passes afterward (uv run pytest tests/browser/test_render_application_boundary.py::test_a_returning_widget_repaints_to_restore_subscriptions -q -n0). Formatting andgit diff --checkpass.Closes #5094 — automated triage