Repository navigation
Orphan guard replaces leakless #46
Copy link
Copy link
Closed
Labels
ready-for-agentFully specified, ready for an AFK agentFully specified, ready for an AFK agent
Description
Parent
Spec: #33 (Baseline release). Section numbers refer to its Implementation Decisions.
What to build
A browser wand launched dies with the wand process even when that process is killed hard, with no guard process, no embedded binary and no file dropped at launch: the Orphan guard is a job object on Windows, Pdeathsig on Linux and the Pipe tether on every POSIX platform. Spec section 7; ADR-0007; ticket #11.
Acceptance criteria
- leakless is removed from
go.mod; the module contains no embedded executable; a launch writes no executable anywhere. - Windows: the browser joins a kill-on-close job object through
golang.org/x/sys/windows. Linux, every GOARCH including loong64:PdeathsigSIGKILL plusSetpgid, set from a goroutine that locks its OS thread for the browser's lifetime. Every POSIX platform:--remote-debugging-pipepassed with descriptors 3 and 4 created and held unused by wand; Windows passes no pipe. CDP stays on the WebSocket andLaunch()still returns a URL. -
Launcher.Leakless(bool)keeps its name and defaults (on inNew(), off inNewUserMode()); off means no job object, noPdeathsigand no pipe; the process-group kill onKill()andCleanup()remains for browsers that reject the flag. - Tests in the launcher suite using Go's helper-process pattern: the test re-executes its own binary as the driver, the driver launches a browser and reports the PID, the test kills the driver hard (SIGKILL, or
TerminateProcesson Windows) and asserts the browser is gone within a bound; one test per mechanism (job object on Windows,Pdeathsigon Linux, the Pipe tether on macOS and on Linux withPdeathsigdisabled in the helper), plus one asserting aLeakless(false)launch survives the driver's death and is then cleaned up. - A deliberately failing local run of the root suite leaves no browser behind once the test binary exits.
- The PR names rod #720, #1214, #1229, #1232 and #865 as resolved by removal.
Blocked by
- Managed-browser download on fetch: Target Chrome and Companion Chromium #44 (Managed-browser download on fetch: Target Chrome and Companion Chromium)
Metadata
Metadata
Assignees
Labels
ready-for-agentFully specified, ready for an AFK agentFully specified, ready for an AFK agent
Activity