refactor(provider-webdriver): share hub upload helpers and bound session-details lookups
Closed
AM
2mo ago+597+597+012345678901234567890123456789-172-172-012345678901234567890123456789
Summary
First core piece split out of #3118. It contains no TestMu code.
- Moves BrowserStack's upload, install, app-reference and URL-artifact code into shared helpers in
webdriver-utils.tsandartifact-results.ts. This is groundwork for the WebDriver host port named as the next prerequisite in the #3118 review. - Connection verification goes through one
fetchProviderVerificationJson.sameOsVersionand the orientation check move next to the other shared helpers. - Session-details lookups go through
fetchProviderSessionDetails, which sets a 15 s deadline. Every failure, including a timeout or a body that is not JSON, becomes a typedCOMMAND_FAILED. A JSON array is no longer read as session details. - Small BrowserStack behaviour changes:
- An upload reply that is not JSON is now
COMMAND_FAILEDand carries the HTTP status. - An
http(s)--provider-appURL now matches its scheme case-insensitively.
- An upload reply that is not JSON is now
Validation
pnpm check:affected --base main --runpasses.eager-closure-budgetspasses: provider-webdriver still evaluates 49 modules on import.- Removing the deadline makes the new test fail.
- Not run live against BrowserStack.
🤖 Generated with Claude Code