test(remote-react-components): keep the cross-version harness in one tester iframe - #3124
Merged
Merged
Conversation
…tester iframe The in-process cross-version run dies mid-suite in the label workflow: `Browser connection was closed while running tests. Was the page closed unexpectedly?` at file 60 of 84, with 59 files and 150 tests green and no test failure of its own. This is the WebKit iframe leak from #3119. Vitest gives every test file a fresh tester iframe and removes the previous one, and Playwright's WebKit never releases a removed iframe's document — component library, all.css, fonts and last render stay alive, about 200 MB per file. The harness config inherits the shared browser config but never got the `isolate: false` that #3119 put on the package's `visual` project, so the corpus that killed the unsharded `update-screenshots` run kills this one too. The scheduled workflow survives only because it shards the run three ways (~28 files per shard, under the threshold). The label workflow runs all 84 in one process, so the failure shows up there alone. The shared realm suits this harness: `setup.ts`'s first-wins `customElements.define` patch keeps the OLD flr-* registrations for the whole run, and one run covers exactly one version anyway. Also moves `fileParallelism` out of `browser`, where vitest 4 deprecates it in favour of the top-level option. Behaviour is unchanged — the run was already serial. Verified with the reference pass that failed in CI: 84/84 files, 179 tests, and 86s instead of 243s, because the library is imported once rather than per file (import 3.3s instead of 129.7s).
Contributor
Coverage Report for ./packages/components/
File CoverageNo changed files found. |
Contributor
🚀 Preview DeploymentPreview environments are ready:
Images:
|
Contributor
✅ Cross-Version Tests PassedThe current host still renders old published remote versions correctly (iframe) and in the same DOM shape (in-process). Iframe harness (attribute-accurate): ✅ passed In-process harness (structure-only): ✅ passed |
mfal
enabled auto-merge (squash)
September 3, 2026 13:12
Lisa18289
approved these changes
Sep 4, 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.
The in-process cross-version run dies mid-suite in the label workflow:
Browser connection was closed while running tests. Was the page closed unexpectedly?at file 60 of 84 — 59 files and 150 tests green, no test failure of its own. Seen on therun-cross-version-testslabel run of #3084, which is otherwise unrelated to this.Cause
The WebKit iframe leak from #3119. Vitest gives every test file a fresh tester iframe and removes the previous one, and Playwright's WebKit never releases a removed iframe's document — component library,
all.css, fonts and last render stay alive, roughly 200 MB per file.e2e/cross-version-inprocess/vitest.config.tsinherits the shared browser config but never got theisolate: falsethat #3119 put on the package'svisualproject. It reuses the same corpus that killed the unshardedupdate-screenshotsrun, on one browser, so it hits the same wall.The scheduled workflow survives only because it shards the run three ways (
FLOW_CROSS_VERSION_SHARD=n/3, ~28 files per shard — under the threshold).test-cross-version-label.ymlruns all 84 files in one process, so the failure shows up there alone.Change
isolate: false— one tester iframe for the whole run. The shared realm suits this harness:setup.ts's first-winscustomElements.definepatch keeps the OLDflr-*registrations for the whole run, and one run covers exactly one version anyway.fileParallelismmoves out ofbrowser, where vitest 4 deprecates it in favour of the top-level option. Behaviour unchanged — the run was already serial.No sharding added to the label workflow: without the per-file iframe churn there is nothing left to accumulate, and the run is now short enough that shard setup would cost more than it saves.
Verification
Ran the exact reference pass that failed in CI (
FLOW_CROSS_VERSION=current … --update):The import collapse is the library being loaded once instead of per file. The label run on this PR exercises the full path.
related #3119