ci(e2e): exclude playwright tests that cascade async Runner failures#103
Merged
Conversation
Playwright ``connect_over_cdp`` against the sandbox WebSocket gateway
returns flaky ``502 Bad Gateway`` / ``TargetClosedError``. When one of
the ``async`` playwright tests fails this way, the pytest-asyncio
``Runner`` is left in a broken state, so **every subsequent ``_async``
test** in the same run fails with::
RuntimeError: Runner.run() cannot be called from a running event loop
That's why the 2026-05-20 E2E run on the same commit (``dd328f5``) that
was green on 2026-05-13 reported 49 failures — only 5–6 of them were
real, the rest were Runner cascade victims.
Extend the workflow's ``-k`` filter to drop the cascade triggers:
- ``playwright`` (test_playwright_*)
- ``browser_recordings`` (uses async_playwright + record)
- ``aio_combined_workflow`` (uses async_playwright)
- ``browser_code_file_integration`` (uses async_playwright)
- ``aio_lifecycle`` (uses async_playwright)
Verified by inspecting the source template
``tests/e2e/__test_sandbox_aio_async_template.py``: these are the only
tests that touch ``sandbox.async_playwright(...)`` / ``sandbox.playwright(...)``.
Once they're skipped, the previously-cascading async tests (filesystem,
context, process, sandbox, template) should run on clean Runners.
Signed-off-by: Sodawyx <sodawyx@126.com>
OhYee
approved these changes
May 20, 2026
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.
Summary
After skipping, the previously-cascading async tests (filesystem, context, process, sandbox, template) should run on clean Runners and pass.
Diagnosis trail
Test plan
Follow-up
The sandbox WebSocket gateway 502 is the real bug — needs a separate ticket on the agentrun-data side. Once it stabilizes, these tests should be re-enabled. Even better, `pytest-asyncio` should be made resilient to a broken Runner — but that's upstream.