Repository navigation
Conversation
An Electron-free manager discovers a Linux Chromium, keeps its profile in a protected directory, tracks it through a state file and lock, and stops it on quit; test-pr cleans up an isolated instance's browser. Nothing calls it yet.
A reused PID or another boot no longer blocks the manager, a pending launch is adopted or cleared, only verified browser processes are signalled, and the quit hook cannot block shutdown.
…only browser processes (#812)
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.
Slice S2 of #812: the managed-browser lifecycle library. Nothing calls it yet: no settings, IPC, UI or session injection (later slices).
src/main/browser/: an Electron-free manager. On Linux it discovers a Chromium (ELF only, so a distribution wrapper script is refused with the real binary to configure), keeps the profile in a 0700 directory owned by the user, and records the browser in a state file with a lock. Identity is checked by executable, profile argument, start time and boot ID before any signal. A reused PID or a new boot resets the state; an ambiguous launch is adopted or cleared. On other platforms every operation returns unsupported without spawning.shutdownForExitstops a browser this instance started, before the database drain, inside a try/catch so it cannot block quit.scripts/test-pr.js: an isolated instance's browser is stopped and its data removed with the rest of the instance.managed-browser,managed-browser-boundaries,managed-browser-shutdown, plus updated shutdown fixtures (each only adds the newmanagedBrowserstub) andtest-pr.Docs:
.ai/contexts/managed-browser.md.Not verified here: real Linux procfs and systemd behaviour (including
$escaping undersystemd-run --scope), a real Chromium.