Repository navigation
fix(browser): stop remote runs when isolated tab creation fails - #452
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: blocked before merge. Reviewed September 5, 2026, 6:16 PM ET / 22:16 UTC. ClawSweeper reviewWhat this changesOrdinary remote browser runs stop when their dedicated Chrome tab cannot be created or attached, with five regression tests covering isolation and cleanup. Merge readiness⛔ Blocked before merge - 1 item remains Still useful and ready for normal landing consideration: current main retains the unsafe fallback, no blocking patch defect was found, and the owner's independent Chrome verification and explicit acceptance resolve the previous compatibility blocker. Priority: P2 Review scores
Verification
How this fits togetherOracle's remote browser runner connects prompts and attachments to an existing Chrome process through the Chrome DevTools Protocol. Its connection helper selects the tab that subsequent navigation and prompt submission will control. flowchart TD
A[Remote browser request] --> B{Explicit tab selected?}
B -->|Yes| C[Attach selected tab]
B -->|No| D[Create and attach dedicated tab]
D -->|Failure| E[Stop before navigation]
D -->|Success| F[Navigate and submit prompt]
C --> F
F --> G[Clean up owned target]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Preserve the owner-approved dedicated-tab contract, retain explicit tab reuse, and keep release-note coverage consolidated in #455. Do we have a high-confidence way to reproduce the issue? Yes: current-main source shows failed dedicated-target acquisition falling through to default-target attachment before runner navigation. Recorded baseline fault tests corroborate that mechanism; this review did not execute it. Is this the best way to solve the issue? Yes: the patch applies the existing strict-isolation pattern at the remote connection boundary while preserving explicit reuse and legacy helper defaults. The owner has accepted the intentional failure-mode change. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 748193758d54. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Maintainer verification at 84f98b8 (production code unchanged from 7f8e619; added contributor credit). Rebuilt the branch and independently ran the contributor's pinned remote-tab isolation script on macOS/Chrome using real HTTP/WebSocket transport. All six cases passed: fresh/reused browser × target-creation failure, target-attachment failure, normal connection. Failure cases made zero WebSocket connections to protected sentinel tabs and caused zero sentinel navigations. Success changed only the newly created target; cleanup restored the target set. Profile/proxy/browser cleanup passed. Focused Chrome lifecycle tests, typecheck, lint, and built CLI help passed. Branch autoreview against origin/main is scoped-clean through P2. CI run: https://github.com/steipete/oracle/actions/runs/33991978727. Fork CI was explicitly approved after review; final conclusion will be checked before a land recommendation. Recommendation: LAND once CI is green. Ordinary remote runs already promise a dedicated tab; refusal preserves that contract, while --browser-tab remains the explicit reuse path. No merge performed. |
|
Exact-head CI is now green: 84f98b8. All four jobs succeeded (Linux, macOS, Windows, Chromium proof). https://github.com/steipete/oracle/actions/runs/33991978727 Branch autoreview is scoped-clean through P2. The previously posted runtime proof still applies; this head only adds contributor credit. LAND recommendation; awaiting orchestrator merge authorization. |
Ordinary remote browser runs now stop if their dedicated tab cannot be created or attached. Previously, `connectToRemoteChrome()` could connect to the default target after that failure, and the runner could navigate an unrelated conversation. Constraint: Keep this patch independent of model registration and unrelated browser changes Confidence: high Scope-risk: narrow Tested: remote target ownership and real runner-path regressions; typecheck, lint and format checks; regression fails on upstream baseline Not-tested: Live provider inference for this isolated patch
84f98b8 to
8e49a38
Compare
|
LAND-READY after restack at 8e49a38, independently based on main 7481937. Exact-head CI succeeded on Linux, macOS, Windows and the Chromium proof job: https://github.com/steipete/oracle/actions/runs/33995209153. Fresh branch autoreview against origin/main is scoped-clean through P2. Local validation: 33 lifecycle tests, typecheck, lint and formatting passed. The three PR-owned production/test files are byte-identical to 84f98b8. Existing independently repeated Chrome proof therefore remains applicable: #452 (comment). All six fresh/reused creation-failure, attachment-failure and success cases passed with zero protected-tab WebSocket connections/navigation and cleanup limited to owned targets. CHANGELOG.md has no diff in this PR; #455 owns the complete release notes and thanks @ShunmeiCho. This PR can land independently of #454; merge #455 after both. No merge performed. |
Ordinary remote browser runs now stop if their dedicated tab cannot be created or attached. Previously, the connection helper could fall back to a default target, leaving subsequent navigation pointed at an unrelated conversation.
Add opt-in
fallbackToDefault: falseand enable it for ordinary remote runs. Strict calls without a target URL createabout:blank; callers that omit the option retain their existing helper behavior. Cleanup remains scoped to newly created targets.Real Chrome evidence
Protocol and scope · candidate results · baseline results · reproduction script
This uses an independent temporary Chrome 137/Linux profile and real HTTP/WebSocket transport. A loopback proxy injects target-creation HTTP 500 or a new target's WS-handshake HTTP 502; it does not mock the CDP client. The matrix covers a fresh profile and the same running browser after another protected page exists.
be6c92a7f8e619Candidate passes all six cases. The identical strict assertions fail on the four baseline fallback cases. Records include module hashes, actual WS target counts, unchanged sentinel URL/nonce/DOM hashes, zero sentinel navigations, and restored target sets. Success also executes and verifies a title update on the new target. Cleanup completes before the final success marker. No ChatGPT login or model request is involved.
Compatibility and validation
Accepting the change means ordinary runs that previously depended on accidental default-tab fallback will now fail before navigation. Operators should fix dedicated-target access, or use explicit
--browser-tabwhen reuse is intentional. Maintainer acceptance of that behavior remains outstanding; this evidence does not establish authenticated-profile migration, other OSes or the separate browser-level WS endpoint path.Regression tests cover creation/attachment failure, strict omitted-URL behavior, success cleanup, and the actual
runBrowserModecall path. Typecheck/lint/format and non-live suites were checked, including the post-build MCP rerun. Complementary to #445 (shared-process/lease lifecycle) and #431 (attachment navigation/dispatch checks); no dependency on those PRs or #448.Restack verification
Rebased independently onto main at 7481937. Current head: 8e49a38. The diff contains only the two production files and lifecycle test file; all three are byte-identical to the previously proven head 84f98b8. CHANGELOG coverage and contributor thanks are consolidated in #455.
Fresh validation: 33 lifecycle tests passed; typecheck, lint and formatting passed. Branch autoreview against origin/main is scoped-clean through P2. The independently repeated real Chrome proof remains applicable because the code is unchanged. Exact-head CI is recorded in the final proof comment. No merge performed.