Skip to content

Merge PTAAA-881-remove-ai-extension-healing-v8 - #330

Merged
bsautomation merged 5 commits into
sdk_v8_pre_prodfrom
PTAAA-881-remove-ai-extension-healing-v8
Nov 2, 2026
Merged

bsautomation merged 5 commits into
sdk_v8_pre_prodfrom
PTAAA-881-remove-ai-extension-healing-v8

Conversation

@bsautomation

@bsautomation bsautomation commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Merge into sdk_v8_pre_prod :by automationbs

Hitesh-IDK and others added 5 commits October 30, 2026 18:19
…pendency

v8 port of #315, which landed the same removal on main (wdio v9). The
security fix has to ship in every supported major, and v8 carries the
identical vulnerable path pinned to @browserstack/ai-sdk-node 1.5.17.

The client-side healing path downloaded the AI browser extension via
BrowserstackHealing.init() and loaded it into the local browser, either
through goog:chromeOptions.extensions or browser.installAddOn(). That
extension ships a window.postMessage handler that forwards a
page-controlled endpoint and bearer to a privileged background fetch,
giving any visited page an SSRF primitive against the machine running
the test. The path is deprecated and only ever ran off BrowserStack
infra, so it is removed rather than hardened.

Removes AiHandler and its two entry points, the healing branch of the
funnel instrumentation, the capability helpers and constants left
without callers, the self-heal performance events, and the
@browserstack/ai-sdk-node dependency.

Self-healing on BrowserStack infra is unaffected: it is driven by the
browserstack.selfHeal capability, resolved hub-side, and never went
through this code. BrowserstackConfig.selfHeal is deliberately kept,
and an off-infra run that sets it now gets a one-time warning instead
of silently losing healing.

Typecheck 12 -> 9 errors (3 removed, 0 added; the rest pre-existing).
Tests 738 -> 728 passing with 0 failures either side; the 10-test drop
is the deleted healing suites.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
sendEvent was only read by the healing instrumentation helpers removed
with AiHandler, so it is dead once they go — the same no-unused-vars
failure this file hit on main.

The new selfHeal warning gated on !shouldAddServiceVersion(...), which
also returns false for a chromedriver service with observability left
on. A genuine BrowserStack session could therefore be told it was not
running on BrowserStack infrastructure. Gate on isBrowserstackInfra()
instead, which is the condition the message actually describes.
shouldAddServiceVersion stays for its four other callers.

Typecheck unchanged at 9 pre-existing errors; tests unchanged at 728
passing / 0 failures.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…e.ts

Its only call site was the healing block removed in this PR; the call
went and the import stayed. Same no-unused-vars shape as the sendEvent
map. Swept the named imports of every file this PR touches — this was
the only one left dangling.

Typecheck unchanged at 9 pre-existing errors; tests unchanged at 728
passing / 0 failures.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Picks up the root-level mocha hook fix (#309). One conflict in
service.ts: its new _setCliSuiteFile(specs?.[0]) call sits directly
above the healing block this branch removes, so the delete read as
covering both. Kept the mocha call, dropped only the healing block.

Tests 731 passing / 0 failures, including all 12 of the new mocha-hook
tests; typecheck unchanged at 9 pre-existing errors.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@bsautomation
bsautomation requested a review from a team as a code owner November 2, 2026 14:50
@bsautomation
bsautomation requested review from pranay-v29 and yashdsaraf and removed request for a team November 2, 2026 14:50
@bsautomation
bsautomation merged commit 9cc91c4 into sdk_v8_pre_prod Nov 2, 2026
16 of 21 checks passed
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.

2 participants