Repository navigation
Every WebKit browser test survives a renderer crash - #2907
Merged
Merged
Conversation
WebKit on Linux crashes its own renderer under CI's load, and the test that had a page open fails with "Target page, context or browser has been closed" for nothing it checks. It failed the 1.2.10 publish three times and WebKit shards on pull requests. Every test file that runs in WebKit now takes `test` from renderer-crash.ts, which runs a test again only when Playwright reported a renderer crash in it, and a CI rule fails a WebKit file left on bun's own `test`. renderer-crash.ts's `test.each` now gets the retry too, and `test.skip` and the rest of bun's `test` are called on bun's own: called on the Proxy, bun refused them and the file failed to load.
davidmckayv
marked this pull request as ready for review
December 3, 2026 23:35
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
December 3, 2026 23:35
davidmckayv
added a commit
that referenced
this pull request
Dec 4, 2026
sittichart17
pushed a commit
to sittichart17/OpenBot
that referenced
this pull request
Dec 4, 2026
…t#2904) * Re-land Boundaries on Cedar (CopilotKit#2880) after 1.2.10 CopilotKit#2880 was reverted in the 1.2.10 release PR (CopilotKit#2903) because it merged during the freeze and its server half (openbot-backend CopilotKit#1139) wasn't in the 1.2.10 images. CopilotKit#1139 is now on backend main, so this brings the app half back unchanged, with release-policy.json at 0219_action_policy_rules. * Boundaries layout test takes test from renderer-crash.ts, as every WebKit test does (CopilotKit#2907)
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.
What this changes
WebKit on Linux crashes its own renderer under CI's load, and whichever test had a page open fails with "Target page, context or browser has been closed", for nothing it checks. Today that failed the 1.2.10 publish three times on
sidebar-current-row.test.tsx, and it has failed a select-box layout test and other WebKit shards on pull requests.app/tests/renderer-crash.tsalready has the answer: atestthat runs a test again when Playwright reports that a page's renderer crashed (up to two more goes) and fails on anything else. Only some of the browser files used it. This moves every one that runs in WebKit onto it, and adds a CI rule so a new one can't land on bun's plaintest.testfromrenderer-crash.ts. 71 files move: the rest of the WebKit job's list,connect-your-ai.test.tsx(its WebKit-only step), and every app browser test that readsOPENBOT_APP_ENGINES, whichtests (changed files)runs in WebKit when it changes. The only change in each is wheretestis imported from; nothing else in them changes.test.eachsurvives a crash too, andtest.skipand the rest work through it. The engine lists are written astest.each(...). Through the old wrapper,test.each(andtest.skip,test.todo,test.only) was called on the Proxy rather than on bun'stest, and bun refuses that: "Expected this to be instanceof ScopeFunctions", and the whole file fails to load. So no file usingtest.eachcould move. Nowtest.eachbodies get the same retry, and the rest of bun'stestis called on bun's own.scripts/ci-changes.test.ts, next to the other real-browser job rules: every test file a ci.yml step runs withOPENBOT_APP_ENGINES(orOPENBOT_APP_ENGINE) set to WebKit, and every app browser test that readsOPENBOT_APP_ENGINES, must importtestfromrenderer-crash.tsand not frombun:test. Two files are exempt, with the reason written next to them:renderer-crash.test.ts, which proves the retry by crashing a renderer and must not retry itself, and the desktop setup window's test, whose own jobs typecheck it without the root's Playwright and which runs one test in WebKit.Real failures still fail. The retry only runs again when Playwright's own crash event fired during the test, or on WebKit's "WebKit encountered an internal error" navigation failure; anything else is the test's on that go. This PR adds a fixture case for exactly the words a crash fails with, "Target page, context or browser has been closed", from a page the test closed itself and with no crash behind it: it fails at once, on its first go.
Test-only. Nothing a deployment runs changes.
Where it runs
Boundary and audit
API and database
api/, no app's requests, no database change and norelease-policy.json.Changelog
None: test-only, nobody running OpenBot would notice.
Proof
The CI rule, red before, green after. On main's tree (with the rule added),
bun test scripts/ci-changes.test.ts -t "takes .test. from renderer-crash"fails and lists 72 files on bun'stest(the 71 moved here, plus the desktop file, since exempted). After the change: 67 pass, 0 fail.The retry's own test (
OPENBOT_APP_BROWSER=1 bun test app/tests/renderer-crash.test.ts, in a real Chromium whosechrome://crashcrashes the renderer on purpose):renderer-crash.tsit fails: the fixture doesn't load (TypeError: Expected this to be instanceof ScopeFunctions ... ERR_INVALID_THISat itstest.each), so no test in it runs.test.each, a crash once passes on go 2 and an assertion failure fails on go 1;test.skipnever runs and the file loads.The WebKit list on CI (this PR's run): all three shards green, 0 failures. On shard 1 the renderer crashed twice in
sidebar-current-row.test.tsx("click: Target page, context or browser has been closed"); each time the test ran again and passed.The WebKit list, locally, at two workers (this Mac is shared): 116 files in Chromium and WebKit. The run was cut short when the branch's worktree was removed after the merge, so its last files failed for missing files (
ENOENT). It is not a clean local result.Checks:
biome lint --error-on-warnings .andbiome format .clean;bun run --cwd app typecheckclean.No screen changes, so there are no screenshots.