Repository navigation
fix(browserstack): send W3C-only capabilities so bstack:options labels are honoured - #2608
Conversation
…s are honoured BrowserStack's hub classifies a create-session request as legacy JSON Wire as soon as any legacy top-level key (`device`, `os_version`, `app`) is present. In that mode it reads project/build/name from the legacy top-level keys, which agent-device never sets, and ignores `bstack:options` entirely — so every session still landed in "Untitled Project" / "Untitled Build" with an empty name after #2495 carried the `--provider-project` / `--provider-build` / `--provider-session-name` flags through to the provider (#2494). `buildBrowserStackCapabilities` now emits `appium:deviceName`, `appium:platformVersion` and `appium:app` instead, leaving `bstack:options` as the only vendor block. Verified against live App Automate sessions: the same `bstack:options` payload is ignored with the legacy keys present and honoured without them, independent of Appium version. Integration assertions updated to the W3C shape and extended to reject any legacy key at the top level. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Reviewed at 12e5c14. This looks clean: the builder now sends only One question: can a user-supplied No CI checks have run on this head yet. |
|
Reviewed at 12e5c14. The capability change looks fine, with no code findings. The live App Automate check in the description ran on the fork release v0.21.1-pelago.1. Could you link a run on 12e5c14, or confirm that release is built from this commit? This changes what the hosted session receives, so a run of this exact change matters. CI has not run yet on this fork PR, and there are no conflicts. |
|
Good catch — it depends on which entrypoint builds the session. CLI / daemon path (what this PR fixes): no. Programmatic Happy to add a reject-list in |
Summary
BrowserStack sessions still land in "Untitled Project" / "Untitled Build" with an empty name after #2495 carried
--provider-project,--provider-buildand--provider-session-namethrough to the provider (#2494). The remaining half of that symptom is inbuildBrowserStackCapabilities: it emits the legacy JSON Wire keysdevice,os_versionandappat the top level beside the W3Cbstack:optionsblock. The hub classifies any request carrying a legacy key as a legacy session, reads project/build/name from the legacy top-level keys (never set), and ignoresbstack:optionsentirely.The builder now emits
appium:deviceName,appium:platformVersionandappium:app, leavingbstack:optionsas the only vendor block. Verified against live App Automate sessions: the samebstack:optionspayload is ignored with the legacy keys present and honoured without them, independent of Appium version.Integration assertions move to the W3C shape and
cloud-webdriver-provider-adaptersadditionally rejects any legacy key (device,os_version,app,project,build,name) at the top level.5 files touched (1 source, 3 integration tests, CHANGELOG). Related: #2494, #2495.
Validation
Tested commit: 12e5c14
pnpm check:affected --base upstream/main --run— all runnable checks passed (format, lint, typecheck, layering, fallow, build, vitest-related: 103 files / 588 tests).pnpm exec vitest run test/integration/provider-scenarios/cloud-webdriver-{lease-http,provider-adapters,runtime}.test.ts packages/provider-webdriver/src/browserstack.test.ts— 14/14 passed (provider-integration project).v0.21.1-pelago.1), used in our CI since 2026-09-14.Unresolved risk: none known. No public flag or wire-response change.