Skip to content

fix: restore cloud worker Desktop on node-backed Crabbox workers - #126393

Merged
steipete merged 3 commits into
mainfrom
fix/cloud-worker-node-desktop
Aug 19, 2026
Merged

steipete merged 3 commits into
mainfrom
fix/cloud-worker-node-desktop

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Follow-up to #121475.

What Problem This Solves

Fixes an issue where operators enabling the Cloud Worker Desktop lab could no longer provision or observe Crabbox desktops after cloud-worker execution converged on node transport. Crabbox still understood desktop-capable profiles, but the provider rejected them before allocation and Gateway observation required an SSH-backed environment, so the Labs feature was effectively disabled on current node-backed workers.

Why This Change Was Made

This restores one canonical node-only flow. Crabbox provisions XFCE/TigerVNC and advertises Browser/Terminal, while Gateway owns private node transport, one-use observer tickets, view-only filtering, controller arbitration, app-launch dispatch, and durable environment/lease/node/epoch fencing. Core stays provider-agnostic; Crabbox-specific setup, launchers, timeouts, and the packaged 1920×1080 wallpaper remain in the plugin.

The repair also makes gateway.publicOrigin the canonical enrollment fallback, removes Doctor's obsolete destructive Desktop cleanup, and splits the enlarged Crabbox provider into focused machine-catalog, enrollment-bootstrap, and wallpaper owners rather than adding a max-lines exemption.

AI-assisted implementation and review; I understand and verified the resulting ownership and security boundaries.

User Impact

Operators can enable Cloud Worker Desktop and get a live, authenticated Desktop pane for fresh AWS or Hetzner Crabbox workers without exposing RFB publicly or reintroducing SSH as the OpenClaw runtime carrier. Browser and Terminal launch into the same visible desktop, controller mode is explicit, view-only mode is server-enforced, and workers use a fresh lease-scoped Chrome profile with loopback CDP.

The generated worker wallpaper is packaged as a static plugin asset and rendered consistently on the live TigerVNC monitor:

Hetzner clean-machine proof

Cloud Worker Desktop wallpaper on Hetzner

AWS clean-machine proof

Cloud Worker Desktop wallpaper on AWS

The AWS image also surfaced a Crabbox base-image issue where two xfce4-panel processes compete for the notification area; the node/RFB/Desktop flow remained healthy and the Hetzner image was clean.

Evidence

Local source proof:

  • node scripts/run-vitest.mjs src/gateway/worker-environments/node-desktop-carrier.test.ts src/gateway/worker-environments/node-enrollment.test.ts src/gateway/worker-environments/environment-access.test.ts src/node-host/desktop-stream-command.test.ts src/node-host/invoke-worker-supervisor.test.ts src/gateway/desktop/node-observe.integration.test.ts extensions/crabbox/src/crabbox-worker-provider.test.ts extensions/crabbox/src/doctor.test.ts test/scripts/runtime-postbuild.test.ts — 225 tests passed across four shards.
  • node scripts/run-vitest.mjs extensions/crabbox/src/crabbox-worker-provider.test.ts extensions/crabbox/src/doctor.test.ts — 115 tests passed after the provider ownership split.
  • pnpm check:changed — passed all selected formatting, typecheck, lint, import-cycle, metadata, database, SDK-boundary, and guard lanes.
  • pnpm build — passed; root and package-local wallpaper copies matched the source byte-for-byte at 753,513 bytes and 1920×1080.
  • Exact candidate tarball SHA-256: fd1106f9a7b400008bfcdbe6cd562095bc0a4a2695a46e51fc4d9736286121fc.
  • Final structured reviews: all three commits clean with no accepted/actionable findings; the binary PNG was separately inspected and validated by dimensions, package-copy equality, decoder round-trip, and live rendering.

Fresh live DevGateway proof on the exact candidate:

  • Protected package endpoint returned unauthenticated 404 and authenticated 200.
  • Fresh AWS (c7a.8xlarge) and Hetzner (ccx33) environments reached ready, advertised Desktop plus only Browser/Terminal, and persisted nodeBacked=true, sshBacked=false.
  • Browser and Terminal launch RPCs returned status=ready on both providers.
  • RFB listened only on 127.0.0.1:5900 and [::1]:5900 on both workers.
  • AWS inspection reported public network, no Tailscale, and instanceProfileAttached=false.
  • Real Control UI /focus/desktop captures reported connected, one framebuffer canvas, the exact environment source, and controlling=true in controller mode / controlling=false in view-only mode for both providers.
  • Gateway restart plus temporary auth-token rotation preserved both environment records and node reconnection.
  • Both environments were destroyed through Gateway; subsequent AWS and Hetzner provider lists returned no matching leases. All temporary Gateway, package server, tunnels, browser profile, pairing state, and secret-bearing files were removed.

@clawsweeper

clawsweeper Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime extensions: crabbox size: XL maintainer Maintainer-authored PR labels Aug 19, 2026
@steipete
steipete marked this pull request as ready for review August 19, 2026 18:11
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. 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 Aug 19, 2026
@clawsweeper

clawsweeper Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 19, 2026, 2:18 PM ET / 18:18 UTC.

ClawSweeper review

What this changes

Restores Cloud Worker Desktop streaming and Browser/Terminal launch for node-backed Crabbox leases through a fenced private node transport.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 5 items remain

Keep open for normal protected-label review: the branch restores a shipped Cloud Worker Desktop capability that current main disables for node-backed Crabbox workers, with no concrete patch defect found.

Priority: P2
Reviewed head: 5cb289c91aa64b76f83a3746116a60877fb59940

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong provider-backed behavior evidence and focused boundary tests support a solid repair, pending normal exact-head validation.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The supplied PR evidence records after-fix AWS and Hetzner node-backed desktop provisioning, launch, stream, restart, and cleanup behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The supplied PR evidence records after-fix AWS and Hetzner node-backed desktop provisioning, launch, stream, restart, and cleanup behavior.
Evidence reviewed 6 items Current-main defect: Current main requires an SSH endpoint for desktop observation and app launch, while the node-backed worker form has a node device identity instead; Crabbox Doctor also removes the desktop setting for that form.
Canonical repair path: The branch preserves the SSH carrier and adds a node carrier that revalidates lease, node, pairing generation, and ownership around private stream and launch commands.
Transport boundary: The node registry checks the private-command allowlist, live pairing generation, and supplied authorization callback before invocation.
Findings None None.
Security None None.

Live Verification

Command: pnpm openclaw --help

Result: PASS (completed)

pnpm openclaw --help
runner@runnervm76f27:/tmp/clawsweeper-live-proof-126393-xUzr9k/target$ pnpm openclaw --help
$ node scripts/run-node.mjs --help
pnpm openclaw --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 399.96 kB
[log] ‹DIR›/a2ui-v0.9.bundle.js  chunk │ size: 615.66 kB
[log]
[success] rolldown v1.2.0 Finished in 100.08 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.6s
node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2343:30) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2343:31 ]
      │
 2343 │           ASM_CONSTS[start] = eval(func);
      │                               ──┬─
      │                                 ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2366:32) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2366:33 ]
      │
 2366 │           moduleExports[name] = eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

[tsdown-build] invocation 2/2 finished in 11.6s
[plugin-control-plane-loads] verified 36 built modules with native require and checked doctor closures
runtime-postbuild: 10 phases completed in 3667ms (slowest: built plugin control-plane loads 2572ms)

OpenClaw 2026.8.1 (5cb289c) — All your chats, one OpenClaw.

Usage: openclaw [options] [command]

Options:
  --container ‹name›   Run the CLI inside a running Podman/Docker container named ‹name› (default: env OPENCLAW_CONTAINER)
  --dev                Dev profile: isolate state under ~/.openclaw-dev, default gateway port 19001, and shift derived ports (browser/canvas)
  -h, --help           Display help for command
  --log-level ‹level›  Global log level override for file + console
… output truncated …

Assertions:

  • PASS expect_output: Usage:

How this fits together

Cloud Worker Desktop connects a Crabbox-provisioned worker desktop to the Gateway and Control UI. Provider lease metadata selects either the existing SSH path or the new node-carried stream and launch path.

flowchart LR
  A[Crabbox profile] --> B[Cloud worker lease]
  B --> C[Paired node]
  C --> D[Gateway desktop carrier]
  D --> E[Control UI desktop pane]
  D --> F[Browser and Terminal launch]
Loading

Before merge

  • Resolve merge risk (P1) - The repair adds about 981 net production lines for a regression fix; no net-neutral alternative was identified because a node-only worker needs a generic fenced carrier and host command while Crabbox-specific setup remains plugin-owned.
  • Resolve merge risk (P1) - Existing desktop-capable workers must be reprovisioned to acquire the restored node desktop path.
  • Resolve merge risk (P1) - Private node commands and VNC credential forwarding are security-sensitive despite the ticket, pairing, owner, loopback, and view-only fences.
  • Resolve merge risk (P1) - Exact-head required checks were still incomplete in the supplied status and must finish green before merge.
  • Complete next step (P2) - Wait for exact-head CI and protected-label owner review; no contributor repair is currently indicated.
Agent review details

Security

None.

PR surface

Source +1005, Tests +933, Docs +8, Config +8. Total +1954 across 36 files.

View PR surface stats
Area Files Added Removed Net
Source 24 1257 252 +1005
Tests 9 1143 210 +933
Docs 2 16 8 +8
Config 1 9 1 +8
Generated 0 0 0 0
Other 0 0 0 0
Total 36 2425 471 +1954

Review metrics

Metric Value Why it matters
Production versus test delta production +1,234/-253; tests and test support +1,175/-210; docs +16/-8 The substantial production growth is justified by replacing an SSH-only assumption with a fenced generic node carrier and preserving plugin-specific ownership.
Desktop configuration behavior 1 existing Labs setting behavior changed desktop-enabled node-backed Crabbox profiles stop being Doctor-removed and require worker reprovisioning to gain the restored capability.

Stored data model

Persistent data-model change detected: durable storage schema: src/gateway/worker-environments/environment-access.test.ts, durable storage schema: src/gateway/worker-environments/environment-access.ts, durable storage schema: src/gateway/worker-environments/node-desktop-carrier.test.ts, durable storage schema: src/gateway/worker-environments/node-desktop-carrier.ts, durable storage schema: src/gateway/worker-environments/node-enrollment.test.ts, durable storage schema: src/gateway/worker-environments/node-enrollment.ts, and 18 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Validate the canonical node carrier before landing (recommended)
    Require exact-head CI and protected-label review of the fenced private-node transport before merging the restored desktop path.
  2. Pause for another owner cloud run
    Request an additional provider-backed desktop provisioning run if maintainers want fresh operational evidence beyond the supplied AWS and Hetzner proof.

Technical review

Best possible solution:

Merge after exact-head checks are green and protected-label review confirms the node-carried carrier is the intended canonical replacement for the obsolete SSH-only assumption.

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

Yes—current main's node-only Crabbox lease lacks the SSH endpoint required by the desktop access path, so the reported failure is source-reproducible.

Is this the best way to solve the issue?

Yes—the node carrier is the appropriate repair because the provider is intentionally node-backed; restoring SSH or moving Crabbox launcher policy into core would violate the existing ownership boundary.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 03a48b5801e3.

Labels

Label changes:

  • add P2: This restores a meaningful but default-off experimental Cloud Worker Desktop capability with bounded operator impact.
  • add merge-risk: 🚨 compatibility: Existing desktop-enabled node workers need reprovisioning and Doctor behavior changes from removing the setting to supporting it.
  • add merge-risk: 🚨 security-boundary: The branch carries VNC access and app launch over private node commands, making ticket, pairing, and ownership fencing merge-critical.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The supplied PR evidence records after-fix AWS and Hetzner node-backed desktop provisioning, launch, stream, restart, and cleanup behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The supplied PR evidence records after-fix AWS and Hetzner node-backed desktop provisioning, launch, stream, restart, and cleanup behavior.

Label justifications:

  • P2: This restores a meaningful but default-off experimental Cloud Worker Desktop capability with bounded operator impact.
  • merge-risk: 🚨 compatibility: Existing desktop-enabled node workers need reprovisioning and Doctor behavior changes from removing the setting to supporting it.
  • merge-risk: 🚨 security-boundary: The branch carries VNC access and app launch over private node commands, making ticket, pairing, and ownership fencing merge-critical.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster 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 PR evidence records after-fix AWS and Hetzner node-backed desktop provisioning, launch, stream, restart, and cleanup behavior.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied PR evidence records after-fix AWS and Hetzner node-backed desktop provisioning, launch, stream, restart, and cleanup behavior.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the original desktop feature and the recent worker-environment split affecting the SSH-only path. (role: feature author and recent area contributor; confidence: high; commits: b5d5ec340fe7, 9f8d53d6fb14; files: src/gateway/worker-environments/environment-access.ts, extensions/crabbox/src/doctor.ts, extensions/crabbox/src/crabbox-worker-provider.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Let exact-head required checks complete green and obtain protected-label owner review.

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.

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready on exact head 5cb289c91aa64b76f83a3746116a60877fb59940.

Local proof:

  • Focused Desktop/Crabbox/runtime-postbuild Vitest selection: 225 tests passed across four shards.
  • Post-refactor Crabbox provider selection: 115 tests passed.
  • pnpm check:changed: green.
  • pnpm build: green.
  • Final structured autoreview: all three commits clean; no accepted/actionable findings.

Live proof on the exact packed candidate (fd1106f9a7b400008bfcdbe6cd562095bc0a4a2695a46e51fc4d9736286121fc):

  • Fresh AWS and Hetzner Desktop workers reached ready as node-backed, non-SSH environments.
  • Browser and Terminal launch returned ready on both.
  • RFB was loopback-only on both.
  • AWS had no Tailscale and no instance profile.
  • Real Control UI focus routes connected with one framebuffer canvas in both controller and view-only modes on both providers.
  • Both environments were destroyed through Gateway and both provider lease lists were empty afterward.

CI: run 32285892296 completed green on the exact head.

ClawSweeper reviewed this exact head with no findings and sufficient live proof. The only visual caveat is a Crabbox AWS base-image duplicate xfce4-panel warning; Hetzner was clean, and it did not affect Desktop transport, launch, control, or teardown.

@steipete
steipete merged commit 84c2111 into main Aug 19, 2026
313 checks passed
@steipete
steipete deleted the fix/cloud-worker-node-desktop branch August 19, 2026 18:50
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
…nclaw#126393)

* fix(gateway): carry cloud worker desktops over nodes

* fix(crabbox): restore node-backed worker desktops

* refactor(crabbox): split worker provider owners
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation extensions: crabbox gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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