Skip to content

fix(browser): avoid cold mac chrome version timeouts - #85460

Merged
giodl73-repo merged 1 commit into
openclaw:mainfrom
giodl73-repo:user/giodl/85418-chrome-version-probe
May 24, 2026
Merged

giodl73-repo merged 1 commit into
openclaw:mainfrom
giodl73-repo:user/giodl/85418-chrome-version-probe

Conversation

@giodl73-repo

@giodl73-repo giodl73-repo commented May 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • read macOS Chromium app bundle versions from Contents/Info.plist before spawning the browser
  • extend the fallback --version probe timeout so cold Gatekeeper/amfid verification has room to finish
  • add focused regression coverage for plist-first, fallback, and non-bundle version probes

Fixes #85418.

Verification

2026-05-23 update after rebasing onto origin/main (32f91503be), head a68f25d386:

  • node scripts/run-vitest.mjs extensions/browser/src/browser/chrome.version.test.ts --reporter=verbose (1 file, 3 tests passed)
  • ./node_modules/.bin/oxfmt --check --threads=1 CHANGELOG.md extensions/browser/src/browser/chrome.executables.ts extensions/browser/src/browser/chrome.version.test.ts
  • ./node_modules/.bin/oxlint extensions/browser/src/browser/chrome.executables.ts extensions/browser/src/browser/chrome.version.test.ts
  • git diff --check origin/main...HEAD

Earlier verification before the rebase:

  • OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs extensions/browser/src/browser/chrome.version.test.ts extensions/browser/src/browser/chrome.test.ts extensions/browser/src/doctor-browser.test.ts -- --reporter=verbose
  • pnpm exec oxlint --tsconfig config/tsconfig/oxlint.extensions.json extensions/browser/src/browser/chrome.executables.ts extensions/browser/src/browser/chrome.version.test.ts extensions/browser/src/browser/chrome.test.ts extensions/browser/src/doctor-browser.test.ts
  • git diff --check
  • codex review --uncommitted

Real behavior proof

Behavior addressed: openclaw doctor --deep no longer has to spawn /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --version to determine the Chrome version on macOS app-bundle installs, so a cold Gatekeeper/amfid spawn delay does not collapse into the misleading unknown-version warning.

Real environment tested: WSL Ubuntu-24.04 checkout at /root/src/openclaw-85460, Node/Vitest via repo wrapper.

Exact steps or command run after this patch: node scripts/run-vitest.mjs extensions/browser/src/browser/chrome.version.test.ts --reporter=verbose

Evidence after fix: the regression test reads macOS app bundle versions from Info.plist before spawning Chrome stubs process.platform=darwin, calls production readBrowserVersion('/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'), returns 148.0.7778.179, and asserts only /usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' /Applications/Google Chrome.app/Contents/Info.plist ran with an 800 ms timeout. The fallback test proves the executable --version probe uses a 6000 ms timeout when plist metadata is unavailable.

Observed result after fix: focused browser version test passed 3 tests; focused static checks were clean.

What was not tested: I did not reproduce a real macOS Gatekeeper cold-cache delay in this Linux/WSL checkout; the issue report provides the live macOS timing, and this patch proves the production path avoids that spawn before falling back.

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels May 22, 2026
@clawsweeper

clawsweeper Bot commented May 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

Latest ClawSweeper review: 2026-05-24 01:21 UTC / May 23, 2026, 9:21 PM ET.

Workflow note: Future ClawSweeper reviews update this same comment in place.

How this review workflow works
  • 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.

PR Surface
Source +31, Tests +86, Docs +1. Total +118 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 32 1 +31
Tests 1 86 0 +86
Docs 1 1 0 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 119 1 +118

Summary
The PR updates browser Chrome version detection to read macOS app bundle Info.plist before spawning Chrome, raises the fallback --version timeout to 6 seconds, adds focused regression tests, and adds a changelog entry.

Reproducibility: yes. source-level: current main turns a Chrome --version call that exceeds 2000 ms into null, and browser doctor emits the reported unknown-version warning. I did not establish a live macOS Gatekeeper cold-cache reproduction in this review.

PR rating
Overall: 🦐 gold shrimp
Proof: 🦪 silver shellfish
Patch quality: 🐚 platinum hermit
Summary: The patch is small and coherent with focused tests, but real macOS proof is still absent and the exported helper behavior needs maintainer acceptance.

Rank-up moves:

  • Add redacted real macOS proof for the doctor/app-bundle path after the patch; redact private paths, IPs, keys, phone numbers, and non-public endpoints.
  • Record maintainer acceptance of the browser-host-inspection helper timing and return-shape change, or narrow the change so the public helper contract is preserved.
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

Real behavior proof
Needs real behavior proof before merge: The PR body has structured proof, but it is WSL/Vitest mocked-helper proof; the contributor should add redacted real macOS terminal output, logs, terminal screenshot, or recording showing openclaw doctor --deep or the app-bundle probe after the patch, then update the PR body so ClawSweeper can re-review automatically or via @clawsweeper re-review.

Risk before merge

  • The PR body provides structured proof, but it is WSL/Vitest proof with mocked process execution rather than a real after-fix macOS openclaw doctor --deep or app-bundle version probe.
  • readBrowserVersion is exported through openclaw/plugin-sdk/browser-host-inspection; this PR changes macOS app-bundle output from raw executable --version text to the plist version string and changes fallback timing for all callers.
  • The longer synchronous fallback can wait up to 6 seconds for non-bundle or plist-unavailable executables, which is an intentional but maintainer-owned stall tradeoff.
  • The protected maintainer label means this PR needs explicit maintainer handling rather than cleanup closure or automated merge.

Maintainer options:

  1. Require macOS proof and SDK sign-off (recommended)
    Before merge, add redacted real macOS doctor or app-bundle version-probe proof and have maintainers explicitly accept the browser-host-inspection helper timing and return-shape change.
  2. Narrow or preserve the exported helper
    If maintainers do not want the SDK helper behavior to change, keep the plist-first mitigation doctor-internal or preserve the old readBrowserVersion output shape while adding the macOS metadata path.
  3. Accept the bounded helper change
    Maintainers may intentionally own the 6 second fallback and plist version-string behavior if they judge the public helper contract loose enough for this bug fix.

Next step before merge
No automated repair is appropriate because there are no concrete code findings; the remaining blockers are contributor real macOS proof, protected-label maintainer handling, and acceptance of the exported helper behavior change.

Security
Cleared: No concrete security or supply-chain regression found; the diff adds no dependencies or scripts and uses execFileSync without a shell against a fixed system tool plus an argument-array plist path.

Review details

Best possible solution:

Land the plist-first browser plugin fix after redacted real macOS proof and explicit maintainer acceptance of the public browser-host-inspection helper timing and return-shape change; otherwise narrow the behavior to the doctor path or preserve the SDK helper shape.

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

Yes, source-level: current main turns a Chrome --version call that exceeds 2000 ms into null, and browser doctor emits the reported unknown-version warning. I did not establish a live macOS Gatekeeper cold-cache reproduction in this review.

Is this the best way to solve the issue?

Yes, mostly: reading macOS bundle metadata before spawning Chrome is the narrowest durable mitigation for the reported doctor false warning. The remaining solution-fit questions are merge proof and whether maintainers accept the exported helper's timing and output-shape change.

Label changes:

  • add merge-risk: 🚨 compatibility: The diff changes behavior for readBrowserVersion, which is exported through the plugin SDK browser host-inspection facade.
  • add merge-risk: 🚨 availability: The fallback executable version probe becomes a longer synchronous wait for non-bundle or plist-unavailable paths.

Label justifications:

  • P2: This is a concrete user-facing browser doctor false warning with a narrow browser plugin blast radius and no core runtime outage.
  • merge-risk: 🚨 compatibility: The diff changes behavior for readBrowserVersion, which is exported through the plugin SDK browser host-inspection facade.
  • merge-risk: 🚨 availability: The fallback executable version probe becomes a longer synchronous wait for non-bundle or plist-unavailable paths.
  • rating: 🦐 gold shrimp: Current PR rating is 🦐 gold shrimp because proof is 🦪 silver shellfish, patch quality is 🐚 platinum hermit, and The patch is small and coherent with focused tests, but real macOS proof is still absent and the exported helper behavior needs maintainer acceptance.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body has structured proof, but it is WSL/Vitest mocked-helper proof; the contributor should add redacted real macOS terminal output, logs, terminal screenshot, or recording showing openclaw doctor --deep or the app-bundle probe after the patch, then update the PR body so ClawSweeper can re-review automatically or via @clawsweeper re-review.

What I checked:

Likely related people:

  • steipete: Local blame points the current version probe and doctor warning path at Peter Steinberger in this shallow checkout, and GitHub path history shows repeated browser plugin and SDK-surface refactors by this handle. (role: feature owner and recent area contributor; confidence: high; commits: fa5c8345f38b, 827b0de0ce74, a6f9c1f6e85e; files: extensions/browser/src/browser/chrome.executables.ts, extensions/browser/src/doctor-browser.ts, extensions/browser/src/doctor-browser.test.ts)
  • obviyus: GitHub file history for chrome.executables.ts shows recent Chrome/Chromium executable detection fixes adjacent to the version-probe code changed here. (role: recent browser executable contributor; confidence: medium; commits: 3050b1568d9d, baa08dd5d146; files: extensions/browser/src/browser/chrome.executables.ts)
  • giodl73-repo: Beyond opening this PR, this handle appears in merged browser doctor history for legacy browser-profile residue handling, so they have prior current-main context in the affected doctor surface. (role: recent browser doctor contributor; confidence: medium; commits: 1b5bc3316111; files: extensions/browser/src/doctor-browser.ts, extensions/browser/src/doctor-browser.test.ts)
  • joshavant: The compatibility-sensitive export route goes through the browser host-inspection facade consolidated by this handle. (role: adjacent SDK surface contributor; confidence: medium; commits: 33ad806a14ef; files: src/plugin-sdk/browser-host-inspection.ts, src/plugins/contracts/plugin-sdk-subpaths.test.ts)

Codex review notes: model gpt-5.5, reasoning high; reviewed against 9a73ddc39485.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels May 22, 2026
@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat.

Where did the egg go?
  • The egg game starts only after the PR passes the real-behavior proof check.
  • Before that, no creature or rarity is rolled. The treat waits for real proof.
  • This is still just collectible flavor: proof affects review readiness, not creature quality.

@giodl73-repo
giodl73-repo force-pushed the user/giodl/85418-chrome-version-probe branch from 3f894dc to a68f25d Compare May 24, 2026 01:15
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels May 24, 2026
@giodl73-repo
giodl73-repo merged commit 2e8dee7 into openclaw:main May 24, 2026
108 of 110 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doctor: Chrome version detection is flaky on macOS due to Gatekeeper cold-cache latency (2s timeout too tight)

1 participant