Skip to content

Fix validate on main: WebMCP flag for Chrome 157+ and bwrap path in bench test - #150

Merged
rgarcia merged 3 commits into
mainfrom
hypeship/fix-extension-tests-chrome-157
Nov 27, 2026
Merged

rgarcia merged 3 commits into
mainfrom
hypeship/fix-extension-tests-chrome-157

Conversation

@rgarcia

@rgarcia rgarcia commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

validate has been red on main because two things changed under CI without any change to the repo: Chrome stable moved to 157, and ubuntu-latest moved from Ubuntu 24.04 to 26.04.

1. Extension browser tests (Chrome 157+). CI installs chrome@stable, so the browser moved from 156.0.8078.80 (last green run) to 157 and, by now, 158. Chrome 157 removed the WebMCPTesting feature, so the test launcher's --enable-features=WebMCPTesting no longer exposed document.modelContext, and 9 tests timed out with supported: false. The same API is behind the WebMCP feature on 156, 157 and 158, so the launcher now enables WebMCP.

The CLI's chrome://flags entry enable-webmcp-testing@1 still exists in 157 and still turns on document.modelContext (checked by launching 157 with it set in Local State), so the CLI needs no change. Only the comment naming the underlying feature is updated.

2. Bench real-sandbox test (Ubuntu 26.04). On the 24.04 runner, bwrap could not create a sandbox, so the two real-sandbox tests were skipped. On 26.04 bwrap works, so they ran in CI for the first time, and one failed with spawnSync bwrap ENOENT. The test spawns bwrap with an environment whose PATH holds only the fake pi prefix and Node's directory. That includes /usr/bin when Node is installed there, but not on the runner, where Node lives in /opt/hostedtoolcache. The test now spawns the bwrap found on the host PATH, and its assertion reports the exit signal and spawn error instead of only stderr. bench/run.mjs passes the user's full environment to bwrap, so the bench itself is unaffected.

Testing

  • CI validate passes on this branch, with Chrome 158.0.8127.88 on Ubuntu 26.04. Both real-sandbox bench tests ran rather than being skipped.
  • Locally, node --test "extension/**/*.test.mjs" (with XWEBMCP_SYNTHETIC_CI=1) passes 35/35 on Chrome 156.0.8078.80 and 157.0.8103.78. Before the change, 157 failed 9.
  • Locally, running bench/test/sandbox.test.mjs with Node outside /usr/bin reproduces the CI ENOENT without the fix and passes with it. The full bench suite passes 130/130.
  • go test ./internal/chrome/ passes.

@rgarcia rgarcia changed the title Enable WebMCP in extension browser tests for Chrome 157 Fix validate on main: WebMCP flag for Chrome 157+ and bwrap path in bench test Nov 27, 2026
@rgarcia
rgarcia merged commit b8e3ceb into main Nov 27, 2026
2 checks passed
@rgarcia
rgarcia deleted the hypeship/fix-extension-tests-chrome-157 branch November 27, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant