Repository navigation
fix(browser): honor explicit snapshot timeout - #124575
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs real behavior proof before merge. Reviewed August 26, 2026, 2:52 AM ET / 06:52 UTC. ClawSweeper reviewWhat this changesThis PR adds leaf-level timeout handling for browser screenshot and snapshot commands, forwarding an explicitly supplied budget to both Gateway transport and the browser endpoint. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 4 items remain The patch is a focused, correct repair for the ignored explicit timeout, but it still needs an after-fix Browser/Gateway trace before merge because current evidence is mock-based. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe browser CLI turns operator flags into Gateway browser requests. The Gateway forwards the request to the browser plugin, whose snapshot route applies the requested timeout to tab discovery and browser-driver work. flowchart LR
A[Browser CLI command] --> B[Timeout source selection]
B --> C[Gateway browser request]
C --> D[Snapshot route plan]
D --> E[Browser driver operation]
E --> F[Snapshot or screenshot result]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +24, Tests +65. Total +89 across 2 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the shared inspect-level resolver, preserve the 20-second unspecified fallback, and attach a redacted live trace showing an explicit timeout reaches the browser owner before merge. Do we have a high-confidence way to reproduce the issue? Yes—source inspection gives a high-confidence reproduction path: on current main, an explicit browser timeout reaches Gateway but is absent from the snapshot query, leaving the snapshot owner at its 20-second fallback. A real Gateway run has not been supplied. Is this the best way to solve the issue? Yes—the inspect-level resolver is the narrowest maintainable fix because it preserves Commander option-source semantics and passes one normalized explicit value to both Gateway and the endpoint owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fc64c5704a77. 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
HistoryReview history (2 earlier review cycles)
|
6fbba25 to
1ee95e2
Compare
|
Addressed the P1 timeout-default regression on exact head
The PR body records the remaining live browser/Gateway proof gap. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
1ee95e2 to
267a52a
Compare
|
Addressed the second P1 finding on exact head
The PR body now records the exact commands and the remaining live Gateway proof gap. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
ClawSweeper recorded closeout evidence for this proposed close.
|
Co-authored-by: Peter Steinberger <[email protected]>
a337e5c to
d4a0194
Compare
|
Merged via squash.
|
Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Partially addresses #124521: restores the explicit CLI timeout override; the default-timeout decision and release follow-through remain out of scope.
The browser snapshot CLI always supplied its 20-second command fallback as an explicit request timeout, so the shared request helper ignored a documented explicit
--timeout 60000. Slow snapshots still failed at 20 seconds even when the operator requested a longer budget.Why This Change Was Made
Commander materializes the browser command's default 30-second Gateway timeout in parsed options, so value presence cannot identify an operator override. The snapshot command now declares the timeout at the leaf and reads Commander's option source: a CLI-supplied leaf timeout wins, otherwise a CLI-supplied parent timeout is inherited, while a defaulted parent keeps the established 20-second snapshot fallback. The same resolved budget is sent to both the Gateway request and the snapshot owner through
query.timeoutMs; the shared helper retains its existing fallback-first contract.User Impact
Both
openclaw browser --timeout 60000 snapshotandopenclaw browser snapshot --timeout 60000now carry the requested 60-second budget through the Gateway and the snapshot implementation. Calls without an explicit timeout retain the 20-second snapshot behavior, including the browser command's default 30-second parent timeout.Evidence
Validated exact head
a337e5cff443e1dab1cf1d297937eb5a621e2bfc.query.timeoutMswas absent; the other 16 tests passed.node scripts/run-vitest.mjs extensions/browser/src/cli/browser-cli-inspect.test.ts extensions/browser/src/cli/browser-cli-shared.test.tspassed 2 files / 27 tests.node scripts/run-vitest.mjs extensions/browser/src/browser/routes/agent.snapshot.plan.test.ts extensions/browser/src/browser/client.test.tspassed 2 files / 23 tests.node_modules/.bin/oxfmt --check, focusednode scripts/run-oxlint.mjs --openclaw-focused-config, andgit diff --checkpassed for the changed files..agents/skills/autoreview/scripts/autoreview --mode localcompleted clean withpatch is correct (0.99)and no accepted/actionable findings for the final patch.AI-assisted: developed with Codex; the author reviewed the complete change and validation results.