fix(browser): keep static helper seams cold#59471
Merged
Merged
Conversation
vincentkoc
force-pushed
the
fix/facade-maintenance-classes
branch
from
April 2, 2026 06:34
4a38817 to
c3431d9
Compare
vincentkoc
marked this pull request as ready for review
April 2, 2026 07:53
Contributor
Greptile SummaryThis PR introduces a cold Key changes:
Confidence Score: 4/5
Prompt To Fix All With AIThis is a comment left during a code review.
Path: src/plugin-sdk/browser-host-inspection.ts
Line: 9
Comment:
**Regex may match minor version digits before the major**
`/(\d+)(?:\.\d+){0,3}/` has no word boundary or start-of-segment anchor. For a version string like `"Chromium 3.0/1.2.3"`, the first match is `"3"` (major = 3) rather than the intended major part. In practice, Chrome version strings are `"Google Chrome 144.0.7534.0"` so this causes no bug today, but a small anchor would make the intent explicit and protect against unexpected formats:
```suggestion
const CHROME_VERSION_RE = /(\d+)(?:\.\d+){0,3}/;
```
Consider using `/\b(\d+)(?:\.\d+){0,3}/` or, if you always want the last big number before the dot-quad, a leading word boundary `\b`. This is low-risk given real Chrome output, but worth noting for future-proofing.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: src/plugin-sdk/browser-host-inspection.ts
Line: 64-71
Comment:
**Beta/unstable channels classified as `"chrome"` kind, not `"canary"`**
The `findFirstChromeExecutable` helper classifies a candidate as `"canary"` only if its path contains `"sxs"` or `"canary"` (case-insensitive). Linux paths `/usr/bin/google-chrome-beta` and `/usr/bin/google-chrome-unstable` contain neither token, so both are returned with `kind: "chrome"`. Depending on how callers use `BrowserExecutable.kind`, this may cause beta/unstable Chrome to be treated as stable. If `kind` is only consumed for display purposes this is harmless, but if any downstream code gates behaviour on `kind === "chrome"` assuming stability, it could silently include pre-release builds.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: src/gateway/server.sessions.gateway-server-sessions-a.test.ts
Line: 168-172
Comment:
**`movePathToTrash` mock silently dropped**
The previous mock of `browser-runtime.js` included `movePathToTrash: vi.fn(async () => {})`. The new mock of `browser-maintenance.js` omits it. If any code path reachable from these tests (e.g., via `session-reset-service.ts` calling agents cleanup) ever calls `movePathToTrash`, the real implementation would execute against the filesystem instead of being intercepted. Worth confirming that no agent-deletion path can be triggered from the reset scenarios covered by this suite, or explicitly re-adding the no-op mock as a safety net.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "Merge branch 'main' into fix/facade-main..." | Re-trigger Greptile |
ngutman
pushed a commit
that referenced
this pull request
Apr 3, 2026
* fix(browser): keep static helper seams cold * fix(browser): narrow sandbox helper facade imports * fix(browser): harden host inspection helpers
steipete
pushed a commit
to duncanita/openclaw
that referenced
this pull request
Apr 4, 2026
* fix(browser): keep static helper seams cold * fix(browser): narrow sandbox helper facade imports * fix(browser): harden host inspection helpers
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
* fix(browser): keep static helper seams cold * fix(browser): narrow sandbox helper facade imports * fix(browser): harden host inspection helpers
ogt-redknie
pushed a commit
to ogt-redknie/OPENX
that referenced
this pull request
May 2, 2026
* fix(browser): keep static helper seams cold * fix(browser): narrow sandbox helper facade imports * fix(browser): harden host inspection helpers
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
* fix(browser): keep static helper seams cold * fix(browser): narrow sandbox helper facade imports * fix(browser): harden host inspection helpers
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 24, 2026
* fix(browser): keep static helper seams cold * fix(browser): narrow sandbox helper facade imports * fix(browser): harden host inspection helpers
Nachx639
pushed a commit
to Nachx639/clawdbot
that referenced
this pull request
Jun 17, 2026
* fix(browser): keep static helper seams cold * fix(browser): narrow sandbox helper facade imports * fix(browser): harden host inspection helpers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
browser-runtimefacade, so plain host inspection like Chrome MCP readiness depended on browser runtime activation.browser-host-inspectionseam, re-exported those helpers directly frombrowser-runtime, and moved core maintenance/config callers ontobrowser-config/browser-maintenanceseams.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause / Regression History (if applicable)
browser-runtimestill bundled static host-inspection exports with activated runtime exports, and core callers were importing the mixed facade for config/cleanup paths.git blame, prior PR, issue, or refactor if known): this is follow-on hardening after the facade activation guard PR.Regression Test Plan (if applicable)
src/plugin-activation-boundary.test.ts,src/commands/doctor-browser.test.ts, gateway mutation/reset tests.User-visible / Behavior Changes
Diagram (if applicable)
Security Impact (required)
Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
Expected
Actual
Evidence
Human Verification (required)
pnpm test -- src/commands/doctor-browser.test.ts src/plugin-activation-boundary.test.ts src/gateway/server-methods/agents-mutate.test.ts src/gateway/server.sessions.gateway-server-sessions-a.test.ts,pnpm check,pnpm build.pnpm test.Review Conversations
Compatibility / Migration
Risks and Mitigations