Skip to content

fix(browser): start control when the Gateway has activated the plugin - #154255

Merged
obviyus merged 3 commits into
openclaw:mainfrom
Alix-007:alix/fix-browser-effective-activation-20260921
Sep 21, 2026
Merged

obviyus merged 3 commits into
openclaw:mainfrom
Alix-007:alix/fix-browser-effective-activation-20260921

Conversation

@Alix-007

@Alix-007 Alix-007 commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Related: #154066

What Problem This Solves

Gateway startup can activate the browser plugin in memory while preserving the authored configuration. Cold browser-control startup then incorrectly checks the authored allowlist again and reports the activated plugin disabled.

This repairs that runtime/control mismatch. It does not claim to fix external rewriting or ordering of plugins.allow; the diagnostics from #154091 remain intact.

User Impact

A browser that the Gateway has activated can initialize its in-process control service and eager HTTP control server without requiring an extra source-allowlist edit. Effective plugin disablement, deny rules, disabled plugin entries, and a fresh browser.enabled=false still prevent cold startup. Browser options continue to use the existing source-backed refresh owner, and startup does not rewrite the authored allowlist.

Why This Change Was Made

Both existing cold-start owners now evaluate plugin enablement using the activated runtime config. Their browser-option resolver, authentication, shared control state, and shutdown owners are unchanged. No new configuration, dependency, schema, permission policy, or public SDK surface is introduced.

Evidence

  • Actual supported Gateway startup: on main 894fb140a22246bc1574d5b29fe61e10f77036de, both the registered browser.request path and eager HTTP startup reproduce the false allowlist refusal. The Gateway records browser auto-activation, the source allowlist remains unchanged, and explicitly allowlisting browser restores the baseline positive control.
  • Candidate runtime: the same real CLI/Gateway, authenticated WebSocket client, and HTTP routes pass 28 scenarios. These cover both cold entrypoints, source-option refresh, all four disable/restart/recovery paths, unchanged authored config during reads/startup, and absent/bad HTTP-token rejection. Only the downstream CDP-discovery endpoint is synthetic and returns 503; no Chrome process is launched.
  • Discriminating regressions: six newly added assertions fail against the original startup owners; the fresh-source browser-disable preservation case passes. Four focused browser suites pass 86 tests. After removing the fixture's retired color field, its 11 tests and scoped lint pass again; unchanged sibling results are retained.
  • Source and checks: baseline and candidate runtime builds pass; scoped type-aware lint, formatting, whitespace, and both structural ratchets pass. The prepared contributor-preserving branch has the exact same complete tracked tree as the runtime-tested candidate.
  • Settlement: the normal Gateway lifecycle closes owned servers and process groups without forced retirement. Source-helper compiler services are observed separately after their driver exits; all 256 observed child processes are gone before synthetic state is removed. The Node fence admits no external request and records two blocked catalog-prewarm attempts separately.

The baseline's explicit-allowlist rescue setup also exposed an eager hot-disable counterexample; that failed observation is retained, not presented as a passing baseline suite. The candidate's auto-activated configuration passes its complete live disable/restart/recovery sequence. Earlier fixture setup failures are also retained rather than counted as product failures or successful runs.

Limits: this is real Gateway/control-startup and configuration-lifecycle proof on Node 24.21/macOS, not Chrome navigation, native-app, visual UI, Windows, packet-capture, or full update-migration proof. No live provider, paid model call, operator state, or operator Gateway was used. Hosted exact-head CI and final review remain required before landing.

@clawsweeper

clawsweeper Bot commented Sep 21, 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.

@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 21, 2026
@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 12:28 AM ET / 04:28 UTC (Revision 2).

ClawSweeper review

What this changes

Browser control now checks the Gateway’s activated plugin configuration at both cold-start entrypoints while retaining fresh browser settings and adding regression coverage.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused fix: current main still rejects browser control after successful runtime activation. No actionable patch defect was found, and the supplied runtime observations cover the changed startup paths.

Priority: P1
Reviewed head: a6f1ba2978df09fc1594b4a07c0f35d8f2306f07

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow owner-level repair with meaningful regressions and relevant real Gateway observations supports normal mergeable quality.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The supplied real Gateway observations exercise both changed startup owners through authenticated WebSocket and HTTP entrypoints, reporting recovery from the baseline refusal plus disable/restart and bad-token rejection. Synthetic downstream CDP discovery does not bypass the changed startup boundary.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The supplied real Gateway observations exercise both changed startup owners through authenticated WebSocket and HTTP entrypoints, reporting recovery from the baseline refusal plus disable/restart and bad-token rejection. Synthetic downstream CDP discovery does not bypass the changed startup boundary.
Evidence reviewed 9 items Pinned introduced change: The introduced delta changes only the enablement input in the two startup owners and extends the existing shared-control regression suite; it introduces no config key, SDK export, dependency, or storage format.
Current-main defect remains: Current main obtains the effective runtime configuration but checks browser plugin enablement against the source-backed refresh configuration. The HTTP startup owner retains the same mismatch.
Latest-release check: The v2026.9.5 source also passes browserCfg to the previous enablement helper, so the latest supplied release does not contain this repair.
Findings None None.
Security None None.

How this fits together

The browser plugin turns authenticated Gateway requests and local HTTP requests into browser-control operations. Gateway activation determines plugin availability, while the source-backed configuration supplies refreshed browser options.

flowchart TD
  A[Authored configuration] --> B[Gateway plugin activation]
  B --> C[Effective runtime configuration]
  A --> D[Fresh browser options]
  C --> E[Browser startup checks]
  D --> E
  E --> F[Shared browser control]
  G[Authenticated requests] --> F
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source 0, Tests +51. Total +51 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 2 2 0
Tests 1 52 1 +51
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 54 3 +51

Review metrics

None.

Technical review

Best possible solution:

Keep plugin enablement owned by the activated runtime and browser-option refresh owned by the existing source snapshot, without rewriting operator configuration.

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

Yes: a restrictive source allowlist, successful runtime browser activation, and a cold control request reach the refusal on current main. Source establishes the path; the PR supplies baseline runtime observations, and this reviewer did not execute code.

Is this the best way to solve the issue?

Yes: correcting the two enablement inputs preserves the established refresh, authentication, and lifecycle owners without introducing another policy path.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P1: A reported browser-agent workflow remains unavailable despite successful Gateway plugin activation.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The supplied real Gateway observations exercise both changed startup owners through authenticated WebSocket and HTTP entrypoints, reporting recovery from the baseline refusal plus disable/restart and bad-token rejection. Synthetic downstream CDP discovery does not bypass the changed startup boundary.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied real Gateway observations exercise both changed startup owners through authenticated WebSocket and HTTP entrypoints, reporting recovery from the baseline refusal plus disable/restart and bad-token rejection. Synthetic downstream CDP discovery does not bypass the changed startup boundary.

Evidence

What I checked:

  • Pinned introduced change: The introduced delta changes only the enablement input in the two startup owners and extends the existing shared-control regression suite; it introduces no config key, SDK export, dependency, or storage format. (extensions/browser/src/control-service.ts:31, a6f1ba2978df)
  • Current-main defect remains: Current main obtains the effective runtime configuration but checks browser plugin enablement against the source-backed refresh configuration. The HTTP startup owner retains the same mismatch. (extensions/browser/src/control-service.ts:31, 9d9dac054cf4)
  • Latest-release check: The v2026.9.5 source also passes browserCfg to the previous enablement helper, so the latest supplied release does not contain this repair. (extensions/browser/src/control-service.ts:31, ec9c1a13db89)
  • Existing configuration ownership: Gateway bootstrap publishes the activated runtime object alongside the original source configuration. Browser refresh intentionally prefers that source snapshot; the patch preserves this choice for browser options rather than replacing the refresh owner. (src/gateway/server-startup-bootstrap.ts:515, a6f1ba2978df)
  • Positive and negative regression coverage: The added cases cover both cold entrypoints, fresh source options, unchanged source configuration, four effective plugin refusals, and fresh browser.enabled=false. The existing auto-enable tests independently establish that configured browser activation can augment a restrictive runtime allowlist. (extensions/browser/src/gateway/browser-request.shared-control-state.test.ts:159, a6f1ba2978df)
  • Supplied real runtime observations: The complete captured PR body, sourceRevision 73380fab9da9465dc8831e41f6aca664cca500e5e53bd9a0056abde93e7a5268, reports baseline failure and 28 passing candidate scenarios through the supported CLI/Gateway, authenticated WebSocket client, and HTTP routes on Node 24.21/macOS. Coverage includes disable/restart/recovery, source preservation, and absent/bad HTTP-token rejection. Only downstream CDP discovery was synthetic; Chrome navigation was not claimed. These are supplied observations, not executions by this reviewer. (a6f1ba2978df)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; 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-21T01:39:41.171Z sha 76da61b :: needs maintainer review before merge. :: none

@obviyus obviyus self-assigned this Sep 21, 2026
@obviyus
obviyus merged commit f13286b into openclaw:main Sep 21, 2026
97 checks passed
@obviyus

obviyus commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Merged as f13286b. Thanks @Alix-007 for the original repair.

Browser control now uses the Gateway's activated plugin decision at both cold-start entrypoints while retaining source-backed browser options. Verified normal Gateway startup, authenticated WebSocket/HTTP controls, source refresh, and disable/restart/recovery in 28 scenarios; 86 focused browser tests passed. No Chrome-navigation or visual-UI proof is claimed.

Exact-head review and required CI passed. Merged through the ordinary guarded route without an admin or CI exception. The separate external allowlist-rewriting report remains outside this fix.

vincentkoc added a commit to jb510/openclaw that referenced this pull request Sep 21, 2026
* commit 'f76d38a4ac5e5f4e6c5a5320436db169e33d5c8a': (49 commits)
  fix(ci): remove duplicate database worker test entry
  fix(voice): keep audio flowing while the Gateway is busy (openclaw#154119)
  docs: reserve Team live updates for Night Watch (openclaw#154425)
  test(meeting-bot): control browser retry fixture clocks (openclaw#149174)
  fix(ui): use remote defaults for manual worktree creation (openclaw#154364)
  fix(proxy): keep WebChat and Codex loopback calls direct (openclaw#154013)
  fix(pr): revalidate head reads and reuse repository locators (openclaw#154212)
  fix(browser): start control when the Gateway has activated the plugin (openclaw#154255)
  improve: publish CI dependencies promptly and warm hosted JavaScript caches (openclaw#154156)
  improve: speed up streaming text with inline brackets (openclaw#154398)
  test: isolate historical Node runner policy from CI
  fix: refresh stale Gateway shutdown budgets during updates and Doctor (openclaw#153636)
  ci: use four Windows workers on the 16 class (openclaw#154261)
  feat: verify GitHub credit from trusted OIDC claims (openclaw#153940)
  feat(sessions): support explicit local placement for child sessions (openclaw#153912)
  fix(ui): prevent stale copies after text changes (openclaw#154259)
  perf(gateway): reuse session list candidates across viewers (openclaw#154003)
  perf(codex): bound progressive local catalog waits (openclaw#154362)
  docs: keep update requests owned through acceptance (openclaw#154111)
  perf(state): reduce main-thread coordinator waits (openclaw#154244)
  ...
vincentkoc added a commit that referenced this pull request Sep 21, 2026
* commit 'f76d38a4ac5e5f4e6c5a5320436db169e33d5c8a': (58 commits)
  fix(ci): remove duplicate database worker test entry
  fix(voice): keep audio flowing while the Gateway is busy (#154119)
  docs: reserve Team live updates for Night Watch (#154425)
  test(meeting-bot): control browser retry fixture clocks (#149174)
  fix(ui): use remote defaults for manual worktree creation (#154364)
  fix(proxy): keep WebChat and Codex loopback calls direct (#154013)
  fix(pr): revalidate head reads and reuse repository locators (#154212)
  fix(browser): start control when the Gateway has activated the plugin (#154255)
  improve: publish CI dependencies promptly and warm hosted JavaScript caches (#154156)
  improve: speed up streaming text with inline brackets (#154398)
  test: isolate historical Node runner policy from CI
  fix: refresh stale Gateway shutdown budgets during updates and Doctor (#153636)
  ci: use four Windows workers on the 16 class (#154261)
  feat: verify GitHub credit from trusted OIDC claims (#153940)
  feat(sessions): support explicit local placement for child sessions (#153912)
  fix(ui): prevent stale copies after text changes (#154259)
  perf(gateway): reuse session list candidates across viewers (#154003)
  perf(codex): bound progressive local catalog waits (#154362)
  docs: keep update requests owned through acceptance (#154111)
  perf(state): reduce main-thread coordinator waits (#154244)
  ...
vincentkoc added a commit that referenced this pull request Sep 21, 2026
* commit 'f76d38a4ac5e5f4e6c5a5320436db169e33d5c8a': (58 commits)
  fix(ci): remove duplicate database worker test entry
  fix(voice): keep audio flowing while the Gateway is busy (#154119)
  docs: reserve Team live updates for Night Watch (#154425)
  test(meeting-bot): control browser retry fixture clocks (#149174)
  fix(ui): use remote defaults for manual worktree creation (#154364)
  fix(proxy): keep WebChat and Codex loopback calls direct (#154013)
  fix(pr): revalidate head reads and reuse repository locators (#154212)
  fix(browser): start control when the Gateway has activated the plugin (#154255)
  improve: publish CI dependencies promptly and warm hosted JavaScript caches (#154156)
  improve: speed up streaming text with inline brackets (#154398)
  test: isolate historical Node runner policy from CI
  fix: refresh stale Gateway shutdown budgets during updates and Doctor (#153636)
  ci: use four Windows workers on the 16 class (#154261)
  feat: verify GitHub credit from trusted OIDC claims (#153940)
  feat(sessions): support explicit local placement for child sessions (#153912)
  fix(ui): prevent stale copies after text changes (#154259)
  perf(gateway): reuse session list candidates across viewers (#154003)
  perf(codex): bound progressive local catalog waits (#154362)
  docs: keep update requests owned through acceptance (#154111)
  perf(state): reduce main-thread coordinator waits (#154244)
  ...
vincentkoc added a commit to vyctorbrzezowski/openclaw that referenced this pull request Sep 21, 2026
* commit 'f76d38a4ac5e5f4e6c5a5320436db169e33d5c8a': (44 commits)
  fix(ci): remove duplicate database worker test entry
  fix(voice): keep audio flowing while the Gateway is busy (openclaw#154119)
  docs: reserve Team live updates for Night Watch (openclaw#154425)
  test(meeting-bot): control browser retry fixture clocks (openclaw#149174)
  fix(ui): use remote defaults for manual worktree creation (openclaw#154364)
  fix(proxy): keep WebChat and Codex loopback calls direct (openclaw#154013)
  fix(pr): revalidate head reads and reuse repository locators (openclaw#154212)
  fix(browser): start control when the Gateway has activated the plugin (openclaw#154255)
  improve: publish CI dependencies promptly and warm hosted JavaScript caches (openclaw#154156)
  improve: speed up streaming text with inline brackets (openclaw#154398)
  test: isolate historical Node runner policy from CI
  fix: refresh stale Gateway shutdown budgets during updates and Doctor (openclaw#153636)
  ci: use four Windows workers on the 16 class (openclaw#154261)
  feat: verify GitHub credit from trusted OIDC claims (openclaw#153940)
  feat(sessions): support explicit local placement for child sessions (openclaw#153912)
  fix(ui): prevent stale copies after text changes (openclaw#154259)
  perf(gateway): reuse session list candidates across viewers (openclaw#154003)
  perf(codex): bound progressive local catalog waits (openclaw#154362)
  docs: keep update requests owned through acceptance (openclaw#154111)
  perf(state): reduce main-thread coordinator waits (openclaw#154244)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 22, 2026
…openclaw#154255)

Related: openclaw#154066

## What Problem This Solves

Gateway startup can activate the browser plugin in memory while preserving the authored configuration. Cold browser-control startup then incorrectly checks the authored allowlist again and reports the activated plugin disabled.

This repairs that runtime/control mismatch. It does not claim to fix external rewriting or ordering of `plugins.allow`; the diagnostics from openclaw#154091 remain intact.

## User Impact

A browser that the Gateway has activated can initialize its in-process control service and eager HTTP control server without requiring an extra source-allowlist edit. Effective plugin disablement, deny rules, disabled plugin entries, and a fresh `browser.enabled=false` still prevent cold startup. Browser options continue to use the existing source-backed refresh owner, and startup does not rewrite the authored allowlist.

## Why This Change Was Made

Both existing cold-start owners now evaluate plugin enablement using the activated runtime config. Their browser-option resolver, authentication, shared control state, and shutdown owners are unchanged. No new configuration, dependency, schema, permission policy, or public SDK surface is introduced.

## Evidence

- **Actual supported Gateway startup:** on main `2fa98f7d9f5d42651e301f1460652508571be217`, both the registered `browser.request` path and eager HTTP startup reproduce the false allowlist refusal. The Gateway records browser auto-activation, the source allowlist remains unchanged, and explicitly allowlisting browser restores the baseline positive control.
- **Candidate runtime:** the same real CLI/Gateway, authenticated WebSocket client, and HTTP routes pass **28 scenarios**. These cover both cold entrypoints, source-option refresh, all four disable/restart/recovery paths, unchanged authored config during reads/startup, and absent/bad HTTP-token rejection. Only the downstream CDP-discovery endpoint is synthetic and returns 503; no Chrome process is launched.
- **Discriminating regressions:** six newly added assertions fail against the original startup owners; the fresh-source browser-disable preservation case passes. Four focused browser suites pass **86 tests**. After removing the fixture's retired color field, its 11 tests and scoped lint pass again; unchanged sibling results are retained.
- **Source and checks:** baseline and candidate runtime builds pass; scoped type-aware lint, formatting, whitespace, and both structural ratchets pass. The prepared contributor-preserving branch has the exact same complete tracked tree as the runtime-tested candidate.
- **Settlement:** the normal Gateway lifecycle closes owned servers and process groups without forced retirement. Source-helper compiler services are observed separately after their driver exits; all **256 observed child processes** are gone before synthetic state is removed. The Node fence admits no external request and records two blocked catalog-prewarm attempts separately.

The baseline's explicit-allowlist rescue setup also exposed an eager hot-disable counterexample; that failed observation is retained, not presented as a passing baseline suite. The candidate's auto-activated configuration passes its complete live disable/restart/recovery sequence. Earlier fixture setup failures are also retained rather than counted as product failures or successful runs.

Limits: this is real Gateway/control-startup and configuration-lifecycle proof on Node 24.21/macOS, not Chrome navigation, native-app, visual UI, Windows, packet-capture, or full update-migration proof. No live provider, paid model call, operator state, or operator Gateway was used. Hosted exact-head CI and final review remain required before landing.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: browser P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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.

2 participants