Support durable browser pool clear and zero updates - #219
Merged
Conversation
Preserve omitted values while allowing explicit zero fill rates and durable proxy, profile, extension, and Chrome policy clears. Verify the serialized SDK request bodies and reject conflicting or invalid inputs before making API calls.
Sayan-
approved these changes
Aug 7, 2026
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e3b5b42. Configure here.
| Viewport: viewport, | ||
| ChromePolicy: chromePolicy, | ||
| ChromePolicyFile: chromePolicyFile, | ||
| ClearChromePolicy: clearChromePolicy, |
There was a problem hiding this comment.
Zero fill rate shown as unset
Low Severity
formatFillRate still maps a 0 fill rate to -, so after a successful --fill-rate 0 pause update, browser-pools get presents the pool as having no fill rate instead of a paused 0 value. JSON output still carries the real number.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit e3b5b42. Configure here.
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
--fill-rate 0on browser-pool updatesWhy
The merged browser-pool API distinguishes omission from explicit empty and zero values. The CLI previously could not express several durable clear operations and silently omitted a zero fill rate.
Implementation
Update flags track whether numeric values were explicitly supplied. Empty arrays and objects use the SDK's
SetExtraFieldsescape hatch because generatedomitzerofields otherwise drop them. Create behavior is unchanged.Verification
go test -short -timeout=2m ./...go vet ./...gofmt -l cmdgit diff --checkUpdateimproved from baseline 91.3 to 78.7 through added coverageNote
Medium Risk
Changes PATCH payload semantics for browser pools (clear sentinels and fill-rate zero), which can alter live pool behavior when users run update; scope is limited to the CLI update path with new validation and tests.
Overview
kernel browser-pools updatenow matches the API’s distinction between omitting a field and sending explicit empty/zero values.Fill rate:
--fill-rateuses anInt64Flagso--fill-rate 0is sent (pauses automatic filling) instead of being dropped when the value was previously treated as “unset.”Clear flags: New
--clear-profile,--clear-proxy,--clear-extensions, and--clear-chrome-policyremove durable pool config (alongside existing--clear-start-url). Conflicting set/clear combinations are rejected invalidateBrowserPoolUpdateInputbefore any API call.Wire format: Empty
extensionsandchrome_policyuse the SDKSetExtraFieldsescape hatch so[]and{}surviveomitzeroencoding. Inline/file{}chrome policy now clears policy instead of warning and doing nothing.README documents the new flags and behavior. Tests replace empty-policy warning cases with JSON serialization and validation coverage.
Reviewed by Cursor Bugbot for commit e3b5b42. Bugbot is set up for automated code reviews on this repo. Configure here.