Skip to content

SDK-6821 Phase 3: read apis from the binary's sessionData bucket (flat fallback)#89

Open
anish353 wants to merge 12 commits into
mainfrom
feature/SDK-6821-read-sessiondata
Open

SDK-6821 Phase 3: read apis from the binary's sessionData bucket (flat fallback)#89
anish353 wants to merge 12 commits into
mainfrom
feature/SDK-6821-read-sessiondata

Conversation

@anish353

@anish353 anish353 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

What is this about?

Companion to browserstack-binary#1566 (SDK-6821): the binary relocates internal fields (apis, capabilityMap, grr_region) off session.config onto session.internal, and echoes them under a namespaced sessionData bucket in the StartBinSession/ConnectBinSession config (flat fields retained for backward compat until every SDK migrates).

This PR migrates the WDIO service's read: at the single config parse site (setConfig, which serves BOTH the StartBinSession and ConnectBinSession paths via loadModules), prefer config.sessionData.apis and fall back to the flat config.apis. All downstream consumers (APIUtils.updateURLSForGRR → automate/appAutomate/percy/observability/EDS/app-a11y service URLs) are untouched.

Backward/forward compatible — works against old binaries (no bucket → flat fallback) and new ones (bucket preferred), so it's independently mergeable. Sibling PRs: node-agent#2335, python-sdk#1162, javaagent#2095, csharp-sdk#1196, ruby-sdk#176.

Related Jira task/s

Release (mandatory for every PR — required for the ready-for-review label)

Version bump: (required — tick exactly one)

  • minor (backwards-compatible feature)
  • patch (bug fix or other small change)

Release notes type: (optional)

  • New Feature
  • Bug Fix
  • Other Improvement

Release notes (customer-facing): (optional but encouraged)

Release notes (internal): (required — engineer-facing; what actually changed / why)

  • Read the apis service-URL map from the binary's new config.sessionData bucket (SDK-6821 session.config split), with the flat config.apis as backward-compat fallback. Single-point change in setConfig; verified npm run build clean and the vitest suite shows zero new failures vs main (68 pre-existing environmental failures identical on both).

Checklist

  • Ready to review
  • Has it been tested locally?

PR Validations

Run Tests: Comment RUN_TESTS to trigger sanity tests.

🤖 Generated with Claude Code

…821 Phase 3)

The binary is relocating internal fields off session.config into a
namespaced sessionData bucket in the StartBinSession/ConnectBinSession
echo. Prefer config.sessionData.apis at the single parse site (setConfig
serves both RPC paths), falling back to the flat config.apis so the
service works against both old and new binaries.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@anish353
anish353 requested a review from a team as a code owner July 24, 2026 11:57
Comment thread .changeset/pr-89.md

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this file from .changeset

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@github-actions

Copy link
Copy Markdown
Contributor

🔴 SDK PR Review gate is red. Pending:

  • The SDK PR Review Agent has not reviewed the current head commit yet — run the SDK PR Review Agent.

It turns green once the latest SDK PR Review Agent run reports GTG on the current head commit. A native reviewer approval is separately required by branch protection before merge.

@anish353

Copy link
Copy Markdown
Collaborator Author

RUN_TESTS

@github-actions

Copy link
Copy Markdown
Contributor

🔴 SDK PR Review gate is red. Pending:

  • The SDK PR Review Agent has not reviewed the current head commit yet — run the SDK PR Review Agent.

It turns green once the latest SDK PR Review Agent run reports GTG on the current head commit. A native reviewer approval is separately required by branch protection before merge.

Bucket-only (the Phase-4 shape the flat fallback cannot mask),
bucket-beats-stale-flat, and flat-only (old binary) against the real
setConfig.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🔴 SDK PR Review gate is red. Pending:

  • The SDK PR Review Agent has not reviewed the current head commit yet — run the SDK PR Review Agent.

It turns green once the latest SDK PR Review Agent run reports GTG on the current head commit. A native reviewer approval is separately required by branch protection before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants