fix(provider-webdriver): harden BrowserStack app references and endpoints
Merged
AM
2mo ago+1207+1207+0123456789012345678901234567890123456789-189-189-012345678901234567890123456789
Summary
Split out of #3118 and stacked on #3167. Please review only the top three commits. This PR has no TestMu code.
- A query string on the session-details endpoint override is kept at the end of the URL (
appendUrlPath). Before, the route was appended after the query. - Whitespace-only artifact URLs now count as absent.
- If connection verification gets a 2xx answer that is not JSON, it now returns a typed
COMMAND_FAILEDwith the status and hint. Before, this was reported as a network failure. - Review nit [2]: there is now a single
bs://canonicalizer and grammar (/^bs:\/\/[\w.-]+$/) inproviders.ts. It is used at connect, on the remote-config connect route, in verification and when preparing a session.BS://idis now treated asbs://id.- A malformed id is now
INVALID_ARGS.
Behaviour change: a bs:// id with characters outside [\w.-] is now refused. BrowserStack's documented app_url (bs://<hex hash>) fits it. A bare custom_id is still not accepted through --provider-app; that is unchanged.
Validation
pnpm check:affected --runpasses, andeager-closure-budgetspasses.- Not run live against BrowserStack.
🤖 Generated with Claude Code