Skip to content

feat(v9): restore main parity with upstream — port 4 missed monorepo features (caCert, connect-timeout+retry, origin-gate, a11y-browsers)#61

Open
AakashHotchandani wants to merge 1 commit into
mainfrom
port/wdio-v9-main-parity
Open

feat(v9): restore main parity with upstream — port 4 missed monorepo features (caCert, connect-timeout+retry, origin-gate, a11y-browsers)#61
AakashHotchandani wants to merge 1 commit into
mainfrom
port/wdio-v9-main-parity

Conversation

@AakashHotchandani

Copy link
Copy Markdown
Collaborator

What

Ports 4 features that exist in webdriverio/webdriverio@main (packages/wdio-browserstack-service) but were missing from this repo's main, restoring true v9 parity. All four merged upstream on 2026-06-08/09.

Feature Upstream Symbols restored
Customer CA trust (SSL-inspecting corp proxies: Zscaler/Netskope) #15313 (SDK-5953/6181) caCert.ts, configureCaCertificate, getMergedCa, proxyCaCertificate
Connect-timeout + retry (undici 10s connect abort on constrained CI) #15312 (SDK-6152) fetchWrapper connectTimeoutMs/getDispatcher, CLI_CONNECT_TIMEOUT_MS, CLI_FETCH_MAX_ATTEMPTS, CLI_FETCH_RETRY_BASE_DELAY_MS, fetchWithRetry
External-grid origin gate (don't report non-BrowserStack-grid runs as Automate) #15311 isBrowserStackInfra wiring in config.ts/launcher.ts
Accessibility browser expansion (Safari + Chrome-for-Testing) #15208 SUPPORTED_BROWSERS_FOR_ACCESSIBILITY, MIN_BROWSER_VERSIONS_A11Y(_NON_BSTACK), rewritten validateCapsWithA11y/validateCapsWithNonBstackA11y

Each carried body is byte-identical to upstream main (verified by diff — no stubs), adapted only where this repo's structure differs (gRPC types import from local ./grpc/index.js, not the @browserstack/wdio-browserstack-service package). fetchWrapper.ts is the combined CA + connect-timeout end-state (both features share it).

Why they were missing (root cause — not ordinary drift)

The original standalone snapshot was taken from a working monorepo checkout (~June 1–7) but hand-stamped version: 9.28.0. These 4 PRs merged June 8–9, before the v9.28.0 tag (June 10) — so they're in the real v9.28.0 release but not in the mislabeled snapshot. Every later catch-up sync computed diff(v9.28.0-tag → 9.29.x), which structurally excludes commits already inside 9.28.0 → permanent blind spot. #58 (v8) was unaffected because these features are main-only.

Prevention (follow-ups): extract from an immutable SHA (record it), freeze the monorepo via the removal PR, sync by tree-diff against the recorded SHA (not version-range), and add a CI drift-check diffing src/ against upstream (would have caught the whole missing caCert.ts on day one).

Verification

  • npm run build (buf generate + esbuild + tsc) — green, 0 errors (Node 20).
  • All 14 target symbols present in src (grep > 0); caCert.ts restored.
  • Tests ported: config.test.ts + cli/cliUtils.test.ts 49/49 pass; util.test.ts a11y 21/21 pass. (Unrelated 11 failures are pre-existing network/auth artifacts — reproduce identically on pristine main.)
  • Independently re-verified: build green, symbols present, logic == upstream, 12 files changed (9 src + 3 test, +549/−51), nothing unrelated touched.

🤖 Generated with Claude Code

…t-timeout+retry SDK-6152, origin-gate, a11y-browsers)

Ports the four main-only (v9) features that the standalone @main branch was
behind the WebdriverIO monorepo @main on:

- custom CA trust (SDK-5953, #15313): new src/caCert.ts + fetchWrapper/launcher/
  service/types wiring for proxyCaCertificate / BROWSERSTACK_EXTRA_CA_CERTS.
- connect-timeout + retry (SDK-6152, #15312): fetchWrapper connectTimeoutMs +
  cli/cliUtils CLI_CONNECT_TIMEOUT_MS + fetchWithRetry.
- external-grid origin gate (#15311): config/launcher isBrowserStackInfra so
  external-grid runs are not reported as Automate.
- accessibility browser expansion (#15208): Safari + Chrome for Testing support
  in constants + util validation.

fetchWrapper.ts is the combined monorepo-main end-state carrying both the
CA and connect-timeout changes (grpc-independent; grpc types unchanged, still
from ./grpc/generated). Unit tests ported for all four features.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@AakashHotchandani
AakashHotchandani requested a review from a team as a code owner July 18, 2026 14:16
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