Skip to content

fix(browser): tolerate delayed startup readiness responses - #149284

Merged
steipete merged 2 commits into
mainfrom
codex/browser-startup-readiness-timeouts
Sep 15, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/browser-startup-readiness-timeouts

Conversation

@steipete

@steipete steipete commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes managed browser starts failing their readiness check when a busy Gateway delays responses beyond the short per-request deadline.

User Impact

Starting the managed browser tolerates moderate scheduling delays instead of stopping a browser that can still become ready. Individual failed probes can take longer; the existing eight-second readiness retry window, cleanup, and cancellation remain in place.

Why This Change Was Made

Raise the post-launch HTTP probe allowance from 250ms to 1.5s, which also raises the derived WebSocket stage allowance from 500ms to 2s. Increasing only the overall retry window would continue repeating the same short attempts. Document the timing behavior without changing configuration or remote-browser policy.

Evidence

  • The new 750ms simulated-readiness regression failed with the original timeout and passes with the change, verifying that the launched browser remains owned and running.
  • All 60 focused tests passed in the browser availability and Chrome helper suites, including failure cleanup, cancellation, ownership, and remote CDP behavior.
  • Production and test typechecks, lint, formatting, plugin boundaries, and repository guards passed. A test comparison-order lint issue was corrected and the affected regression and lint checks rerun successfully.
  • Exact-head CI run 34999618346 passed, including the required CI gate. Native PR preparation verified the hosted evidence.
  • Independent review found no actionable P0–P2 issues. This is source and boundary-test proof; no production deployment or live overloaded-Gateway reproduction is claimed.

@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 15, 2026 16:58
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: browser size: XS maintainer Maintainer-authored PR labels Sep 15, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 1:17 PM ET / 17:17 UTC (Revision 2).

ClawSweeper review

What this changes

Increase managed-browser startup probe timeouts to tolerate delayed responses, with a regression test and troubleshooting guidance.

Merge readiness

✅ Ready for maintainer review

The prior documentation finding is resolved, and no actionable introduced defects remain. The fix is still absent from pinned main and the latest release.

Priority: P2
Reviewed head: 7a038e8ea352fd4111f7a596c04804af60b90b0b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with meaningful simulated regression coverage and the prior documentation issue resolved.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied maintainer classification exempts this PR from external-contributor live proof; the reported evidence exercises startup through a mocked readiness client and does not claim real overloaded-Gateway recovery.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied maintainer classification exempts this PR from external-contributor live proof; the reported evidence exercises startup through a mocked readiness client and does not claim real overloaded-Gateway recovery.
Evidence reviewed 7 items Prior finding resolved: The current troubleshooting sentence describes the eight-second retry window without recommending the retired browser.localCdpReadyTimeoutMs setting. This addresses the retained prior finding and the author's correction comment. The configuration owner still assigns the fixed default.
Existing startup owner retained: The existing readiness loop consumes the increased timeout, verifies the spawned PID owns the endpoint, checks cancellation before adoption, and cleans up on failure. Remote and attach-only profiles take separate paths. The diff adds no authority-bearing value, public API, persisted setting, dependency, or security-policy change.
Regression coverage and proof scope: The added test exercises ensureBrowserAvailable with simulated 750 ms readiness responses and asserts that the launched browser remains registered without cleanup. Existing sibling tests cover failed readiness, foreign endpoint ownership, cancellation, and remote profiles. The complete supplied PR body reports 60 focused tests passing and expressly disclaims a live overloaded-Gateway reproduction; tests were not executed during this read-only review.
Findings None None.
Security None None.

How this fits together

The browser plugin launches managed Chrome and checks its Chrome DevTools Protocol connection before reporting startup success. Failed readiness or ownership checks trigger cleanup of the launched process.

flowchart TD
  A[Browser start request] --> B[Launch managed Chrome]
  B --> C[Retry readiness probes]
  C --> D{Ready and owned?}
  D -->|Yes| E[Keep browser running]
  D -->|Timeout or failure| F[Clean up launched browser]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source 0, Tests +19, Docs +1. Total +20 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 2 2 0
Tests 1 19 0 +19
Docs 1 1 0 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 22 2 +20

Review metrics

Metric Value Why it matters
Startup probe allowance HTTP 250→1500 ms; derived WebSocket allowance 500→2000 ms Longer individual probes tolerate delayed responses while retaining the existing eight-second retry window.

Technical review

Best possible solution:

Keep startup tolerance in the existing readiness owner while preserving endpoint ownership checks, cleanup, and separate remote-profile timing.

Do we have a high-confidence way to reproduce the issue?

Yes, at the source level: repeated post-launch responses taking 750 ms exceed main's 250 ms probe limit and exhaust readiness retries. The regression models that path; no live Gateway reproduction was performed.

Is this the best way to solve the issue?

Yes. Adjusting the existing per-probe allowance addresses repeated premature timeouts without introducing another retry mechanism or a configuration option.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against ad6939104457.

Labels

Label justifications:

  • P2: This is a bounded reliability fix for managed-browser startup under delayed readiness responses.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied maintainer classification exempts this PR from external-contributor live proof; the reported evidence exercises startup through a mocked readiness client and does not claim real overloaded-Gateway recovery.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-15T17:05:33.387Z sha 78b4331 :: needs changes before merge. :: [P3] Remove the retired readiness configuration key from the docs

@steipete

Copy link
Copy Markdown
Contributor Author

Corrected the troubleshooting sentence to describe the fixed eight-second readiness retry window and removed the retired configuration key. Verified the fixed default in the browser configuration owner and the key retirement in config validation and Doctor; formatting, diff sanity, and independent review pass. The runtime fix and its existing regression proof are unchanged.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete merged commit 13ce368 into main Sep 15, 2026
229 of 295 checks passed
@steipete
steipete deleted the codex/browser-startup-readiness-timeouts branch September 15, 2026 17:47
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 16, 2026
…149284)

* fix(browser): tolerate delayed startup readiness responses

* docs(browser): remove retired readiness setting reference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation extensions: browser maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant