Repository navigation
Conversation
Sayan-
marked this pull request as ready for review
October 9, 2026 23:29
Sayan-
force-pushed
the
hypeship/fix-pool-acquire-204
branch
from
October 10, 2026 00:00
b789290 to
25cdf95
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make
browser_pools.acquire()returnNonewhen the long poll ends with HTTP 204. The sync and async methods now declare an optional browser result, and only the acquire response model opts into mapping 204 toNone. Explicit raw response parsing, other model endpoints, successful acquire, and 404 error behavior remain as before.Validation
Added mock response tests for 200, 204, and 404, including sync, async, raw parse overrides, and strict validation of an unexpected 204 on another endpoint. The focused response suite passed (31 tests), and Pyright and Mypy passed.
The change was not exercised against a live pool.
The SDK's separate 60-second request timeout can still expire before a longer API poll reaches 204.
Generation and release
This custom SDK change targets
next, the branch used for the versioned release PR. After that release reachesmain, production changes must back-sync to SDK staging and the nextstlcbuild must preserve this behavior. Merge the resulting custom-code tracking PR in the API configuration repo before relying on a later generation. The API's existing OpenAPI contract already documents the 200, 204, and 404 outcomes.Note
Low Risk
Scoped, opt-in response parsing change for one endpoint; callers must handle optional acquire results, but other APIs and strict validation behavior for unrelated 204s are preserved.
Overview
browser_pools.acquire()now returnsNonewhen the long-poll ends with HTTP 204 (no browser available yet), instead of failing response parsing. Sync and asyncacquireare typed asOptional[BrowserPoolAcquireResponse].A new opt-in marker
NoContentAsNoneis added;BrowserPoolAcquireResponseinherits it so the shared response parser maps 204 →Noneonly for that model and only on defaultparse()(explicitparse(to=...)still returns empty body types as before). Other endpoints are unchanged—an unexpected 204 on e.g.retrievestill fails under strict validation.Tests cover 200, 204, 404, async acquire, raw response parsing, and strict validation on a non-acquire route.
Reviewed by Cursor Bugbot for commit 25cdf95. Bugbot is set up for automated code reviews on this repo. Configure here.