Add opt-in CDP extension loading to configure - #344
Open
rgarcia wants to merge 6 commits into
Open
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: E2E uses external start URL
- Replaced the external
https://example.comstart URL in the invalid-strategy subtest with an inlinedata:URL to keep the e2e input deterministic.
- Replaced the external
Or push these changes by commenting:
@cursor push 0ee956fb24
Preview (0ee956fb24)
diff --git a/server/e2e/e2e_chromium_configure_test.go b/server/e2e/e2e_chromium_configure_test.go
--- a/server/e2e/e2e_chromium_configure_test.go
+++ b/server/e2e/e2e_chromium_configure_test.go
@@ -250,7 +250,7 @@
invalid := instanceoapi.ChromiumConfigureParamsExtensionLoadStrategy("invalid")
response := chromiumConfigureE2E(t, ctx, client, configureE2ERequest{
params: &instanceoapi.ChromiumConfigureParams{ExtensionLoadStrategy: &invalid},
- startURL: "https://example.com",
+ startURL: "data:text/html,<title>kernel-configure-invalid-strategy</title>",
})
require.Equal(t, http.StatusBadRequest, response.StatusCode(), "%s", response.Body)
})You can send follow-ups to the cloud agent here.
rgarcia
force-pushed
the
hypeship/configure-cdp-extensions
branch
2 times, most recently
from
August 19, 2026 19:14
317b7ec to
f0dafec
Compare
rgarcia
force-pushed
the
hypeship/configure-cdp-extensions
branch
from
August 19, 2026 20:51
fb72756 to
a1047c1
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Policy restart skips unpacked verification
- In the
prefer_cdprestart-required path, configure now verifies unpacked extensions after restart and surfaces a configure error when activation verification fails.
- In the
Or push these changes by commenting:
@cursor push 6756b5dd4a
Preview (6756b5dd4a)
diff --git a/server/cmd/api/api/chromium_configure.go b/server/cmd/api/api/chromium_configure.go
--- a/server/cmd/api/api/chromium_configure.go
+++ b/server/cmd/api/api/chromium_configure.go
@@ -188,7 +188,13 @@
return reqMsg, err
}
if prepared.requiresRestart {
- return s.chromiumConfigureRestart(ctx, st, spec, commitExtensions)
+ if resp := s.chromiumConfigureRestart(ctx, st, spec, commitExtensions); resp != nil {
+ return resp
+ }
+ if err := s.verifyUnpackedExtensions(ctx, prepared.extensions); err != nil {
+ return cfg500ConfigureStep(chromiumConfigureStepExtensions, err.Error())
+ }
+ return nil
}
// Configure keeps the default restart path's non-transactional install semantics.You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 7c7d312. 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
extension_load_strategy=restart|prefer_cdptoPOST /configurerestart, or combined with a profile, nonempty policies, or nonempty Chromium flagsCompatibility
The strategy is a query parameter rather than a multipart field. Older images ignore unknown query parameters, so requests to mixed fleets remain successful and use their legacy unconditional restart behavior. The regenerated Go client exposes the enum through
ChromiumConfigureParams; invalid values receive a 400 from the strict service handler.No diagnostic response fields or other response contract changes are included.
Review follow-up
prefer_cdpwith an extension and display resize on both headless and headful images, asserting extension activation, changed resolution, stable WebSocket identity, and no restartTesting
go vet ./...go test -race $(go list ./... | grep -v '/e2e$') -count=1go test -v -race -timeout 20m ./e2e -run '^TestChromiumConfigureExtensionLoadStrategies$' -count=1go test -v -race -timeout 15m ./e2e -run '^TestChromiumConfigureMultipartPowerset$' -count=1Note
Medium Risk
Changes Chromium configure and extension activation paths (stop/start, CDP, persisted flags); default behavior is unchanged when the parameter is omitted, but fallback leaves partial state on failure by design.
Overview
Adds optional query parameter
extension_load_strategy(restart|prefer_cdp) onPOST /configure. Omitted orrestartkeeps today’s behavior: extensions still force a stop/start cycle when combined with profiles, nonempty policies, or flags.With
prefer_cdp, extension-only (plus display/start URL) requests prepare zips before taking the config lock, commit once, and try live CDP activation without restarting. Enterprise-policy extensions, nonempty flags/policies/profile, or CDP load failures trigger one in-request restart using the already-prepared batch (no second multipart parse). Restart path gains injectable extension install and post-restart verification hooks.Extension helpers are refactored:
commitPreparedExtensionsno longer returnsrequiresRestart;installExtensionZipItemsreplaces the old apply helper. OpenAPI and the Go client passChromiumConfigureParams(including query serialization). Unit and e2e tests cover mode selection, invalid strategy, and restart vs live paths (including display resize without restart).Reviewed by Cursor Bugbot for commit 8427e13. Bugbot is set up for automated code reviews on this repo. Configure here.