Skip to content

refactor(webdriver): build the WebDriver runtime inside each provider plugin - #4977

Merged
thymikee merged 1 commit into
0.22from
refactor/0.22-webdriver-out-of-core
Nov 22, 2026
Merged

thymikee merged 1 commit into
0.22from
refactor/0.22-webdriver-out-of-core

Conversation

@thymikee

@thymikee thymikee commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Summary

AWS Device Farm, BrowserStack, and TestMu build their bundled WebDriver runtime in provider setup. Revyl continues to bundle the WebDriver Android snapshot parser it uses. Plugin contract v3 now returns a runtime directly and exposes a request-scoped diagnostics emitter. This removes the host adapter and agent-device/plugins/webdriver export.

Closes #4974

Value

Core metric Base Head
npm unpacked bytes 6,075,229 6,006,367
npm tarball bytes 1,856,984 1,837,036
Rendered WebDriver modules 20 0

Measured with npm pack --dry-run --json --ignore-scripts after preparing release assets. Base is merge-base bdf5096f77. The core module map retains XML and capture-kit. No other workspace owner or external dependency dropped out.

Validation

Built the root and four provider tsdown configs into temporary directories. A Rolldown generateBundle hook inspected each JavaScript chunk's rendered modules. The provider tarballs contain byte-identical WebDriver chunks, and all four isolated installation smokes passed.

The packed BrowserStack lease probe recorded one webdriver_route_unsupported event in core's request scope at base and head. The provider integration suite covers the request log.

Head b72e8a6909069077570c54c4d79f1e6ebcc21d9d. Foreground pnpm check:affected --run --base origin/0.22 --head HEAD passed with exactCommit: true, including 22,212 unit tests and 319 provider scenarios. Hosted checks and independent review are pending.


Run Proof on this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff Turn on auto-fix

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.15 MB 6.08 MB -68.9 kB
Package (unpacked) 6.15 MB 6.08 MB -68.9 kB
Package (download) 1.87 MB 1.85 MB -20.1 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 19.1 ms 18.8 ms -0.3 ms
CLI --help 39.2 ms 38.6 ms -0.6 ms

@apex-sentinel-staging

This comment has been minimized.

@thymikee
thymikee force-pushed the refactor/0.22-webdriver-out-of-core branch from b72e8a6 to b05c8c0 Compare November 22, 2026 18:40
@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of b05c8c0

Since the review of b72e8a6: 0 new · 0 still open · 0 no longer raised

The changes are the same as on b72e8a6, so this is that review, not a new one. Comment @apex-sentinel-staging review to review again.

No open findings.

Not in the reviewers' prompt (1 file)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

2 findings below minor hidden (user_settings.min_severity).

Reviewed with this repository's own Sentinel configuration (e10ad0cc2fb8).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready at b05c8c0. CI is green: 23 checks, none failing, including the provider-scenario, package-smoke and installed-package jobs that exercise the changed setup route. Not verified here: the module-map or bundle-owner build, the packed-tarball BrowserStack probe, and a live cloud-provider run; the "core renders 0 WebDriver modules" claim and the installed-plugin diagnostics route rest on import greps and code reading, which the fake-server scenarios and isolated install smokes in CI cover for this refactor. Not blocking, and fine to take or leave: the AWS, BrowserStack and TestMu setups repeat the same createCloudWebDriverRuntime wrapper and the same clientVersion/diagnostics wiring, so one shared setup helper exported from the provider-webdriver plugin entry could own it; diagnostics is optional on CloudWebDriverRuntimeOptions, so a provider that omits it would silently drop the route events; the plugins doc line about bundling the engine could say that a third-party plugin brings its own WebDriver client and that the 0.21 { webDriver } descriptor and agent-device/plugins/webdriver are removed in contract v3; and ProviderAgentDevicePlugin is now a pure alias that could be dropped, along with the redundant clientVersion destructure in BrowserStack and TestMu.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 22, 2026
@thymikee
thymikee merged commit e0bb03e into 0.22 Nov 22, 2026
23 checks passed
@thymikee
thymikee deleted the refactor/0.22-webdriver-out-of-core branch November 22, 2026 19:15
hannojg pushed a commit to hannojg/agent-device that referenced this pull request Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant