test: make runtime compatibility fixtures resilient to protocol bumps (#2908)
## Summary - Fix the stale compatibility fixtures causing the TypeScript, Python, and Go failures on release PR #2798. - Derive incompatible runtime versions from the current protocol major instead of hardcoding `2.0.0`. - Use the current protocol version for Go compatible/wrong-runtime fixtures; keep explicit-version protocol comparison tests unchanged. - Test-only changes. No runtime behavior or release version changes. ## Why The release bumps the protocol from `1.0.0` to `2.0.0`. Tests that previously treated `2.0.0` as incompatible start accepting it, while the Go fixture treating `1.0.9` as compatible starts rejecting it. Deriving the fixtures from the current protocol avoids repeating this failure on future major releases. ## Validation Passed with both the main protocol version (`1.0.0`) and a temporary release-equivalent bump (`2.0.0`) applied to the protocol package and generated Go/Python constants: - TypeScript: `pnpm exec vitest run packages/sdk-ts/tests/cdpClientLifecycle.test.ts` — 19 passed. - Python: `uv run --locked pytest tests/test_cdp_client.py -q` — 28 passed. - Go: `go test . -run 'Test(NegotiateRuntimeCompatibility|ProtocolCompatibility)$' -count=1` — passed. Also passed TypeScript oxfmt/oxlint, Python Ruff lint/format, Go gofmt, and `git diff --check`. Temporary version bumps were reverted before committing. Full CI remains to run on this PR. Merge this into main so the release PR can incorporate the corrected fixtures. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes the stale runtime compatibility fixtures in the TypeScript, Python, and Go SDK tests that break when the protocol version bumps. Fixtures now derive incompatible versions from the current protocol major instead of hardcoding `2.0.0`. - Go fixtures use the current `stagehandProtocolVersion` for compatible and wrong-runtime cases and compute the next major for the mismatch case. - Python and TypeScript tests derive the incompatible version as the current protocol major plus one. - Test-only change; no runtime behavior or release version changes. <sup>Written for commit 46e7d4ab25f160e0a86487d456bff934aba684bb. Summary will update on new commits.</sup> <a href="https://cubic.dev/pr/browserbase/stagehand/pull/2908?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
M
Miguel committed
5beaca74cd75dbe7ad09cfb0a2b287cad03ed54e
Parent: d4f16a9
Committed by GitHub <noreply@github.com>
on 9/9/2026, 12:01:52 AM