Tighten browser pool update boundaries - #115
Merged
IlyaasK merged 6 commits intoAug 5, 2026
Merged
Conversation
IlyaasK
marked this pull request as ready for review
August 3, 2026 17:26
IlyaasK
force-pushed
the
fix/rebuild-idle-browsers-on-config-update
branch
from
August 4, 2026 19:01
e311fe4 to
caa0c1a
Compare
Adapt tests to the updated base, preserve unknown nested refresh defaults, follow organization-specific fill-rate limits, and clear profiles in place through the SDK-documented payload.
IlyaasK
force-pushed
the
fix/browser-pool-qa-boundaries
branch
from
August 4, 2026 19:56
ab559c9 to
bbb9c3f
Compare
IlyaasK
merged commit Aug 5, 2026
a9d18b6
into
fix/rebuild-idle-browsers-on-config-update
2 checks passed
IlyaasK
added a commit
that referenced
this pull request
Aug 5, 2026
* Tighten browser pool update boundaries (#115) * Tighten browser pool update boundaries * Prevent no-op browser pool updates * Normalize imported empty extension lists * Fix browser pool planning after restack Adapt tests to the updated base, preserve unknown nested refresh defaults, follow organization-specific fill-rate limits, and clear profiles in place through the SDK-documented payload. * Warn before browser pool replacement * Close browser pool planning test gaps * Simplify browser pool replacement planning
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
nameorviewportis removed because the API cannot clear those fields in placeprofile_idin place with the SDK-documentedprofile: {"id": ""}payloadchrome_policyJSON so key ordering and whitespace changes remain no-op plansviewport.refresh_rateinto a new viewportextension_idsso imported pools with no extensions remain no-op plansfill_rate_per_minuteWhy
Terraform plans must describe what apply can actually perform. Name and viewport removal previously appeared as in-place updates but failed because the API cannot clear them. They now show replacement before approval. Profile removal remains an in-place update because the pinned Kernel SDK explicitly supports clearing the profile reference with an empty ID.
Formatting-only Chrome policy edits and omitted computed defaults also produced noisy plans. The plan modifiers keep semantically unchanged durable state stable while preserving unknown values when the API must choose a default for a newly configured nested viewport.
Fill-rate limits are organization-specific. The provider enforces only the nonnegative SDK contract and leaves each organization's effective maximum to the Kernel API.
Customer impact
nameorviewporttruthfully shows destroy/create replacementprofile_idupdates the existing pool without changing its IDextension_ids = []without driftVerification
go test -short -timeout=2m ./...go vet ./...gofmt -l cmd internalbash scripts/check-docs.shbash scripts/check-markdown-links.shbash scripts/check-examples.shThe live acceptance suite was not rerun after this restack. The original branch previously passed its live browser-pool checks; a fresh live run remains appropriate before merge if credentials are available.
Stacked on #114.
Note
Medium Risk
Changes Terraform plan/apply semantics for browser pools (replacement on name/viewport removal, in-place profile clear, and computed attribute planning), which can surprise operators but is covered by expanded unit tests rather than touching auth or payments.
Overview
Aligns
kernel_browser_poolTerraform planning and updates with what the Kernel API can actually do in place versus what requires pool replacement.Clear vs replace: Removing
nameorviewportnow plans destroy/create (schemaRequiresReplaceIf+ModifyPlanwarning about deleting the pool and leased-browser blocking). Clearingprofile_idis now a supported in-place patch (profile.id = ""), with the old “cannot clear profile” validation removed.Quieter, stabler plans: Semantically equivalent
chrome_policyJSON no longer forces updates (custom plan modifier).extension_idsis optional+computed with create-time default[]andUseStateForUnknownso omitted config on existing/imported pools does not drift; import seeds an empty list. Computed launch/metadata fields (headless,timeout_seconds,fill_rate_per_minute, etc.) keep prior state on unrelated edits; newviewport.refresh_ratestays unknown until the API default is known.Docs and tests cover replacement planning, profile clear payloads, chrome policy equivalence, and extension list behavior.
Reviewed by Cursor Bugbot for commit 4781012. Bugbot is set up for automated code reviews on this repo. Configure here.