fix(browser): preserve shared Chrome across concurrent sessions - #445
fix(browser): preserve shared Chrome across concurrent sessions#445oraclexing wants to merge 2 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 4, 2026, 1:55 PM ET / 17:55 UTC. ClawSweeper reviewWhat this changesThe PR coordinates concurrent manual-login browser sessions so only the final lease may terminate shared Chrome, with Windows-specific detached launch and profile-verified process cleanup. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 1 item remains Keep this active PR open for normal maintainer merge handling. The introduced lease release makes the finality decision and cleanup atomic, and the supplied Windows two-controller evidence directly exercises the concurrent shared-Chrome failure without introducing a supported correctness finding. Priority: P2 Review scores
Verification
How this fits togetherOracle browser mode launches or reuses a Chrome profile for ChatGPT automation. A per-profile lease registry coordinates concurrent controllers and permits shared-browser cleanup only after the final controller releases its lease. flowchart LR
A[Browser controllers] --> B[Shared Chrome profile]
B --> C[Tab lease registry]
C --> D{Final lease release?}
D -->|No| E[Keep Chrome alive]
D -->|Yes| F[Verify profile process]
F --> G[Terminate shared Chrome]
E --> H[Peer session continues]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge the atomic release and profile-verified Windows lifecycle path while retaining conservative shared-Chrome preservation when cleanup safety cannot be proven. Do we have a high-confidence way to reproduce the issue? Yes. The supplied exact-head Windows two-controller smoke has a concrete path: exit a non-final controller, verify the peer continues CDP operations, then verify termination after the peer's final release. Is this the best way to solve the issue? Yes. Atomic caller-only lease release plus exact profile-specific termination is the narrowest maintainable fix for the concurrent shared-Chrome lifecycle race. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against be6c92a9e4cc. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
@clawsweeper re-review Author correction for head The PR body's initial causal attribution is superseded. Multi-process registry stress did not reproduce lease loss. The higher-confidence Windows root cause was controller process ownership: The new commit adds native-Windows Exact-head verification:
Real Windows two-controller smoke:
Final-kill smoke separately verified PID 14808 / port 64198 alive+reachable before cleanup and both absent after; no new WindowsTerminal/OpenConsole process appeared. Evidence boundary: a later Deep Research session was manually submitted by the user, so its final |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
Fix shared manual-login Chrome lifecycle races when several Oracle browser sessions run concurrently.
A completing controller could previously prune foreign tab leases from a single Windows process-liveness false negative, decide it owned the final lease, and terminate Chrome underneath still-running ChatGPT tabs. The observed result was one completed Deep Research run followed by
chrome-disconnectedpartial results in its peers.Changes
--user-data-dirbefore terminationVerification
pnpm run lintpnpm run buildreattach.e2e.test.tspassed in 1.04s when rerun in isolationReal signed-in Deep Research concurrency smoke (no manual Send or Answer now):
heartbeat-gamma-two,heartbeat-alpha-two, andheartbeat-beta-twoall reachedpromptSubmitted=trueleases: [], registry lock absent, port 62611 closed, all controller/Chrome PIDs exited, and no new Windows Terminal/OpenConsole process was createdRegression coverage
Tests cover fresh liveness false negatives, lost-owner release/update, PID reuse, unavailable process identity, concurrent final release, dead/ownerless registry lock recovery, strict lock ownership, Windows retry exhaustion, exact profile-path matching, and shared-Chrome signal preservation.