From 0c8c5352256655ae9cb0a14d4ce8c009ca344a7d Mon Sep 17 00:00:00 2001 From: Hitesh Parmar <10hiteshparmar@gmail.com> Date: Fri, 30 Oct 2026 19:41:25 +0530 Subject: [PATCH 1/2] PTAAA-881: gate the selfHeal warning on isBrowserstackInfra MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The warning added in #315 fires when shouldAddServiceVersion() returns false, but that has two independent causes: not being on BrowserStack infra, and using the chromedriver service with testObservability left on. A genuine BrowserStack session in the second case is told it is not running on BrowserStack infrastructure. Gate on isBrowserstackInfra() instead — the condition the message actually describes. It is already imported here for the same purpose a few lines above. shouldAddServiceVersion stays for its other callers. Found while porting #315 to v8 (#322), which has the corrected gate. Typecheck unchanged at 9 pre-existing errors; tests unchanged at 931 passing / 29 pre-existing failures. Co-Authored-By: Claude Opus 5 (1M context) --- packages/browserstack-service/src/launcher.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/browserstack-service/src/launcher.ts b/packages/browserstack-service/src/launcher.ts index 57cdf819..4a5414d9 100644 --- a/packages/browserstack-service/src/launcher.ts +++ b/packages/browserstack-service/src/launcher.ts @@ -422,7 +422,7 @@ export default class BrowserstackLauncherService implements Services.ServiceInst PerformanceTester.end(PERFORMANCE_SDK_EVENTS.FRAMEWORK_EVENTS.INIT) // The client-side healing extension this option drove off-infra has been removed; on BrowserStack, healing comes from the browserstack.selfHeal capability instead. - if (this._options.selfHeal === true && !shouldAddServiceVersion(this._config, this._options.testObservability, capabilities as Capabilities.BrowserStackCapabilities)) { + if (this._options.selfHeal === true && !isBrowserstackInfra(this._config as BrowserstackConfig & Options.Testrunner, capabilities as Capabilities.BrowserStackCapabilities)) { BStackLogger.warn('selfHeal has no effect for sessions not running on BrowserStack infrastructure. Self-healing on BrowserStack is driven by the browserstack.selfHeal capability.') } From c90365158a7c8903199f3a301718d4bd21a612c4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 30 Oct 2026 14:12:19 +0000 Subject: [PATCH 2/2] chore(changeset): auto-generate from PR template (patch) --- .changeset/pr-325.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/pr-325.md diff --git a/.changeset/pr-325.md b/.changeset/pr-325.md new file mode 100644 index 00000000..81d3c79f --- /dev/null +++ b/.changeset/pr-325.md @@ -0,0 +1,5 @@ +--- +"@wdio/browserstack-service": patch +--- + +- Fixed a warning that could incorrectly tell users their BrowserStack session was not running on BrowserStack infrastructure.