Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 20 additions & 9 deletions docs/playwright-validation.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Playwright validation patch

The workspace pins Playwright Core 1.62.1. Bun applies
`patches/playwright-core@1.62.1.patch` during installation; use the committed lockfile.
The workspace pins Playwright Core 1.64.0. Bun applies
`patches/playwright-core@1.64.0.patch` during installation; use the committed lockfile.

`bun run check:playwright` checks the installed starter dependency with four
synthetic protocol cases. The workspace `check` command includes this gate.
Expand All @@ -10,23 +10,34 @@ It requires the repository-pinned Node 26.5.0. Browser E2E remain separate.
The patch rejects the pending RPC promise when result validation throws.
Upstream removes that callback before validation, leaving the promise unsettled
and throwing outside it. Invalid results remain errors. Event validation is unchanged.
Upstream 1.62.1 still ships the unpatched code: its `lib/coreBundle.js` deletes the
callback and then calls the result validator outside any `try` (line 63499), so the
patch is carried forward, re-derived for the 1.62.1 line offsets.
Upstream 1.64.0 still ships the unpatched code: its `lib/coreBundle.js` deletes the
callback (line 65438) and then calls the result validator outside any `try`
(line 65450), so the patch is carried forward, re-derived for the 1.64.0 line
offsets. The hunk body is unchanged from the 1.62.1 patch; only its offset moved
from 63496 to 65447.

The patch modifies the distributed `lib/coreBundle.js` from the Apache-2.0
Playwright package. Its attribution is retained in the adjacent `.license` file.
The original bundle SHA-256 is
`9393fa79e1c67c74edc26b610d65a4f7ed73d345a762465cc88340a33a2454ac`;
The original 1.64.0 bundle SHA-256 is
`2325ca4c1c83070e89dc49fb82525508f0a68e0cf12e2a624277968da216b7e0`;
the patched bundle SHA-256 is
`72a5af51a1e77ee468a07b3094f2642f507052a332c574f91e981909d9f0cea8`.
`5b55e2391e6afe560230c9228098edc37b3e7f5c505a911aa2c09927c18010ac`.

This is a validation candidate. Synthetic protocol regression tests and local
browser tests do not establish the cause of every CI failure. Keep the patch only
with passing required CI; reassess it when upgrading Playwright and remove it when
an upstream version passes the same regression tests without it.

## Why Playwright 1.62.1 and not 1.61.1
## Why Playwright 1.64.0

Playwright 1.64.0 contains the change that closed microsoft/playwright#42731
(microsoft/playwright#42788, merge `b30584c2`, an ancestor of tag `v1.64.0`): the
first Firefox navigation to a `Cross-Origin-Opener-Policy: same-origin` page no
longer hangs. The starter Firefox projects therefore no longer set
`browser.tabs.remote.useCrossOriginOpenerPolicy=false`, the temporary workaround
carried on 1.62.1.

## Why Playwright 1.62.1 and not 1.61.1 (history)

Playwright 1.61.1 installs Chrome for Testing 149.0.7827.55 (Chromium revision
1228, headless shell revision 1228 as well). On the hosted `ubuntu-24.04` runner
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"@libre-ai/auth-web": "file:../ai-work-supervision/packages/auth-web"
},
"patchedDependencies": {
"playwright-core@1.62.1": "patches/playwright-core@1.62.1.patch"
"playwright-core@1.64.0": "patches/playwright-core@1.64.0.patch"
}
}
2 changes: 1 addition & 1 deletion packages/starter/bun-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
},
"devDependencies": {
"@libre-ai/contracts": "file:../../../../schemas-and-contracts/packages/sdk-ts",
"@playwright/test": "1.62.1"
"@playwright/test": "1.64.0"
}
}
8 changes: 1 addition & 7 deletions packages/starter/bun-app/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ export default defineConfig({
{
name: "firefox",
testMatch: /(reference|hydration-marker)\.e2e\.ts/,
use: {
...devices["Desktop Firefox"],
// TODO(playwright-1.64): remove once @playwright/test >= 1.64.0 (microsoft/playwright#42731) — Juggler loses a message on COOP-triggered context replacement.
launchOptions: {
firefoxUserPrefs: { "browser.tabs.remote.useCrossOriginOpenerPolicy": false },
},
},
use: { ...devices["Desktop Firefox"] },
},
{
name: "webkit",
Expand Down
2 changes: 1 addition & 1 deletion packages/starter/starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"react-dom": "19.2.7"
},
"devDependencies": {
"@playwright/test": "1.62.1"
"@playwright/test": "1.64.0"
}
}
8 changes: 1 addition & 7 deletions packages/starter/starter/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,7 @@ export default defineConfig({
{
name: "firefox",
testMatch: /journal\.e2e\.ts/,
use: {
...devices["Desktop Firefox"],
// TODO(playwright-1.64): remove once @playwright/test >= 1.64.0 (microsoft/playwright#42731) — Juggler loses a message on COOP-triggered context replacement.
launchOptions: {
firefoxUserPrefs: { "browser.tabs.remote.useCrossOriginOpenerPolicy": false },
},
},
use: { ...devices["Desktop Firefox"] },
},
{
name: "webkit",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"devDependencies": {
"@biomejs/biome": "2.5.3",
"@libre-ai/governance": "file:../../../project-governance",
"@playwright/test": "1.62.1",
"@playwright/test": "1.64.0",
"@types/bun": "1.3.14",
"@types/react": "19.2.17",
"@types/react-dom": "19.2.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/lib/coreBundle.js
+++ b/lib/coreBundle.js
@@ -63496,8 +63496,12 @@
@@ -65447,8 +65447,12 @@
parsedError.details = detailsValidator(errorDetails ?? {}, "", this._validatorFromWireContext());
callback.reject(parsedError);
} else {
Expand Down
2 changes: 1 addition & 1 deletion scripts/playwright-rpc-regression-child.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const coreEntry = createRequire(playwrightEntry).resolve("playwright-core");
const packageRoot = path.dirname(coreEntry);
assert.equal(
JSON.parse(fs.readFileSync(path.join(packageRoot, "package.json"))).version,
"1.62.1",
"1.64.0",
);
const bundle = path.join(packageRoot, "lib/coreBundle.js");
const hash = () =>
Expand Down