You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e30de89
Browse filesBrowse the repository at this point in the historyBrowse files
fix(test): make the web-shutdown lane's idle-timer proof and cleanup real
Two problems in the shutdown lane added for #1868:
1. createWebSmokeContext() unconditionally set AGENT_BROWSER_IDLE_TIMEOUT_MS
to 30s for every caller, including the new shutdown scenario, whose own
poll window is 45s. A reverted fix (no active browser close on shutdown)
could still pass: agent-browser's own 30s idle timer would reap the
fleet on its own well inside the 45s window, independent of whatever the
daemon's teardown did or didn't do. The comment claiming production
5-minute behavior was simply false.
Parameterize the context so only the functional smoke test opts into the
shortened idle timeout; the shutdown lane now omits the override
entirely, leaving the real 5-minute default in place (pinned by the
existing `resolveAgentBrowserIdleTimeoutMs({})` case in
agent-browser-lifecycle.test.ts) — comfortably past the 45s poll, so a
pass can only mean the daemon actively closed the browser.
2. The scenario's `finally` only closed the fixture HTTP server. A failed
assertion (including the exact failure mode this test exists to catch)
left the daemon process and any still-running Chrome processes on the
runner with nothing cleaning them up.
Move cleanup authority fully into `finally`: stopProcessForTakeover on
the daemon pid (a no-op if it already exited) and the same orphan sweep
daemon startup runs for any leftover managed-browser processes, both
best-effort and independent of how far the try block got, mirroring
cleanupWebSmoke's AggregateError shape so a cleanup failure never
swallows the assertion failure it ran alongside.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011ot5wg8YUEyWRrphs8bMSJ
0 commit comments