Skip to content

Separate live and restart configure paths - #342

Open
rgarcia wants to merge 3 commits into
mainfrom
hypeship/configure-path-refactor
Open

Separate live and restart configure paths#342
rgarcia wants to merge 3 commits into
mainfrom
hypeship/configure-path-refactor

Conversation

@rgarcia

@rgarcia rgarcia commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • model /chromium/configure as explicit live and restart execution modes
  • extract clearly named helpers for the existing live display path and stop/start path without changing their ordering or error handling
  • preserve restart selection for profiles, extensions, nonempty policies, and nonempty Chromium flags
  • preserve live behavior for display-only and start_url-only requests
  • preserve recording-segment restart ordering after successful navigation and before Chromium recovery on error paths
  • add mode/actionable-selection unit coverage and browser WebSocket identity assertions for live and restart e2e cases

Testing

  • go vet ./...
  • go test -race ./cmd/api/api -count=1
  • go test -v -race -timeout 15m ./e2e -run '^TestChromiumConfigureMultipartPowerset$' -count=1
  • built images/chromium-headless/image/Dockerfile locally for the e2e run

The full non-e2e race suite was also attempted. All packages passed except the existing lib/devtoolsproxy restart test, which failed during t.TempDir cleanup because Chromium was still writing its profile directory; rerunning that package reproduced the same cleanup failure.


Note

Medium Risk
Touches Chromium lifecycle, display/recording coordination, and configure error recovery—behavior-preserving refactor but operationally sensitive.

Overview
/chromium/configure is refactored around explicit live vs restart execution modes instead of a single inline needsStop branch.

ChromiumConfigure dispatches via chromiumConfigureModeFor (replacing chromiumNeedsStopCycle) into chromiumConfigureLive (display patch + optional start_url without stopping Chromium) and chromiumConfigureRestart (stop/apply/start). Shared navigation moves to chromiumConfigureNavigate.

On the restart path, recording segment resume is centralized: segments restart after successful navigation on the happy path, and in a defer on errors (before Chromium recovery) instead of only via a display-step defer.

Unit tests cover mode selection and actionables; the configure powerset e2e adds start_url cases and asserts browser WebSocket identity is preserved on live configures and changes on policy/flags/extension restart paths.

Reviewed by Cursor Bugbot for commit e7753a2. Bugbot is set up for automated code reviews on this repo. Configure here.

@rgarcia rgarcia changed the title Separate Chromium configure execution paths Separate live and restart configure paths Aug 19, 2026
@rgarcia
rgarcia force-pushed the hypeship/configure-path-refactor branch 2 times, most recently from d6fb2b8 to 82cfb36 Compare August 19, 2026 18:28
Base automatically changed from hypeship/load-extension-over-cdp to main August 19, 2026 19:10
@rgarcia
rgarcia force-pushed the hypeship/configure-path-refactor branch from 82cfb36 to f6f5874 Compare August 19, 2026 19:10
@rgarcia
rgarcia force-pushed the hypeship/configure-path-refactor branch from f6f5874 to 147da27 Compare August 19, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant