Repository navigation
fix(browser): prevent remote browser timeout stalls and cancellation conflicts - #114131
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 26, 2026, 11:58 AM ET / 15:58 UTC. ClawSweeper reviewWhat this changesThis PR gives Browser actions, node invocation, and Gateway RPC separate bounded timeout budgets, and carries each Browser tool invocation’s abort signal into its remote node-proxy request. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 5 items remain Keep this PR open for explicit Browser-owner review. The patch targets a real remote-node timeout and cancellation boundary, but the supplied proof is primarily mocked and test-gate evidence; it does not show an after-fix run through a real remote Browser node. The Priority: P2 Review scores
Verification
How this fits togetherThe Browser plugin routes a Browser tool action either to local host control or through a selected remote Browser node via Gateway RPC. This change adjusts the timeout and cancellation handoff around that remote-node path so the tool receives the relevant inner failure and cancellation reaches only its own request. flowchart LR
A[Browser tool action] --> B[Browser tool runtime]
B --> C{Remote Browser node selected?}
C -- Yes --> D[Browser node proxy]
D --> E[Node invocation watchdog]
E --> F[Gateway RPC watchdog]
F --> G[Remote Browser action result]
B --> H[Tool cancellation signal]
H --> D
Decision needed
Why: The patch changes nested watchdog ownership and cancellation propagation in a user-facing remote execution path; tests are substantial, but the available proof does not directly exercise the deployed remote Browser-node boundary. Before merge
Agent review detailsSecurityNone. PR surfaceSource +19, Tests +446. Total +465 across 4 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Preserve the bounded, per-request timeout and cancellation design if Browser owners confirm it against a real remote Browser-node action, with redacted evidence showing one cancelled request and unaffected concurrent requests. Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction is available in the supplied evidence. The code and added regressions make the remote-proxy timeout and cancellation path source-reproducible, but they do not show the failure on a real remote Browser node. Is this the best way to solve the issue? Unclear: separating watchdog budgets and passing the invocation signal through the canonical proxy factory is a plausible narrow fix, but direct remote-node proof is needed to establish that it is the best production solution. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 01f8bd9d12d2. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Maintainer and Browser-owner decision for reviewed head 684663d: accept the exact Browser-owner transport proof and proceed with the native maintainer workflow. I independently inspected the complete production chain: extensions/browser/src/browser-tool.ts:441-523, extensions/browser/src/browser-node-proxy.ts:65-187, src/agents/tools/gateway.ts:503-545, src/gateway/server-methods/nodes.invoke.ts:158-211 and :475-520, extensions/browser/src/node-host/invoke-browser.ts:142-175 and :228-318, src/plugin-sdk/number-runtime.ts, and packages/normalization-core/src/number-coercion.ts:104-204. Those actual owner implementations confirm that the tool execution signal reaches the Gateway transport through callGatewayTool, the node registry receives the separately bounded node-invocation timeout and unique idempotency key, and the real Browser-node handler owns the inner action watchdog and detailed timeout envelope. Reserving both 5,000 ms grace windows before the canonical Node maximum preserves the required action < node < RPC ordering. The pre-dispatch-only host fallback and explicit request-signal priority remain intact. Real remote Browser-node proof was not run and is not claimed. I explicitly accept the contract-faithful owner regression because it executes the real Browser tool and canonical proxy, asserts the complete real Gateway request envelope and all three budgets, verifies one cancelled request with nine independent successful concurrent survivors, and includes the actual node-host watchdog suite. The honest fail-before/after is 31 failed / 127 passed to 158 passed; all 137 current restart-recovery cases pass. The separate live GPT-5.4 ten-session Gateway scenario is genuine but is not remote Browser-node proof. Both exact-head hosted openclaw/ci-gate and Real behavior proof succeed, the isolated complete changed gate succeeds, and the fresh committed-head official review has zero findings. This comment is the explicit human maintainer decision requested by the ClawSweeper review; the optional real Browser-node artifact is deferred rather than misrepresented. |
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where users running Browser tools on remote Browser nodes could see misleading outer-watchdog timeouts, stalled cancellation, or interference between concurrent Browser sessions when nested timers reach Node timer limits or one running session is cancelled.
Why This Change Was Made
Keep the existing Browser action, node-invocation, and Gateway RPC watchdogs distinct and bounded, and bind tool cancellation once in the canonical node-proxy factory. Explicit request signals and the existing safe pre-dispatch host-fallback ownership remain intact. This does not change public Browser CLI, HTTP, provider, authentication, or protocol contracts.
User Impact
Remote Browser actions report the correct inner timeout, cancellation reaches the intended in-flight action, and cancelling one of ten concurrent Browser tool executions does not cancel the other nine.
Evidence