Repository navigation
feat(gateway): run disposable cloud workers through node transport - #125288
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
319a1b0 to
a541020
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 2:44 PM ET / 18:44 UTC. ClawSweeper reviewWhat this changesThis PR moves disposable Crabbox cloud workers onto Gateway-managed node enrollment and transport for worker turns, replacing the provider-specific SSH setup path. Merge readinessNo new blocking correctness finding was found on the reviewed head. This maintainer-owned feature should remain open for a rebase onto current main and exact-head validation before the final merge decision. Priority: P2 Review scores
Verification
How this fits togetherA cloud-worker request is persisted by the Gateway, fulfilled by the Crabbox provider, enrolled as an authenticated node, and then used for bundle transfer, workspace sync, and worker execution. Teardown releases the provider lease and removes only the environment-owned node role. flowchart LR
A[Cloud worker request] --> B[Gateway environment record]
B --> C[Crabbox lease]
C --> D[One-use node enrollment]
D --> E[Authenticated node transport]
E --> F[Bundle and workspace transfer]
F --> G[Worker turn]
G --> H[Lease and node-role teardown]
Decision needed
Why: The feature direction is established, but current main changed adjacent worker execution-context behavior after this branch's base, so a human should accept the exact merged behavior. Before merge
Agent review detailsSecurityNone. PR surfaceSource +476, Tests +337, Docs +5, Generated +2. Total +820 across 74 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase the canonical node-enrollment flow onto current main, preserve the current-only explicit provider-mode contract, and validate the merged worker lifecycle through provisioning, restart replay, execution, and teardown. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a feature PR. The relevant proof is the supplied after-fix cloud-worker lifecycle run and the exact-head checks required after rebase. Is this the best way to solve the issue? Yes, subject to rebase validation: reusing the existing authenticated node transport removes the parallel cloud SSH carrier while preserving an explicit SSH-only path for remote-exec runtimes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5fe5d26007cc. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
ClawSweeper exact-head findings, addressed at
Fresh proof:
The earlier live AWS proof remains valid; this follow-up changes only teardown ownership and adds regression coverage. Landing readiness on exact head
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
…penclaw#125288) * feat(gateway): converge cloud workers onto nodes * fix(gateway): honor public URL for cloud enrollment * fix(crabbox): execute cloud bootstrap package binary * fix(gateway): bind cloud nodes in pairing transaction * fix(crabbox): prefer exact installed cloud bootstrap * fix(gateway): complete cloud node bootstrap * fix(gateway): enforce cloud worker capability boundaries * fix(gateway): complete cloud node migration * fix(gateway): preserve paired node roles on teardown
What Problem This Solves
Cloud worker sessions used a Crabbox-specific SSH and workspace carrier even though paired devices already hosted complete worker turns through the node protocol. That split duplicated lifecycle and transport policy, made cloud execution a separate product path, and prevented the Gateway from owning cloud worker identity, bundle, claims, transcript, and workspace behavior through one canonical flow.
Why This Change Was Made
This converges disposable Crabbox worker-turn environments onto the current node worker protocol. The Gateway now owns replay-safe one-use enrollment, persists the authenticated node binding, installs the current worker bundle, transfers the workspace through authenticated node routes, and removes the cloud-owned pairing during teardown.
openclaw connect --ephemeralenables process-scoped worker hosting without installing a service or changing durable worker settings.The cloud path is intentionally current-only: there is no SSH fallback, mixed-version payload, or legacy cloud transport shim. Codex-style remote execution still requires a provider that explicitly advertises SSH-backed
remote-execsupport.AI-assisted; the implementation and live failure analysis were reviewed with the repository autoreview gate.
User Impact
Operators can place ordinary OpenClaw worker turns on disposable cloud machines through the same session-owned node path used by devices. Cloud nodes stay hidden from the persistent paired-device inventory, while their environments remain visible as disposable workers. Provisioning and restart replay reuse the environment-owned setup identity, and teardown removes both the provider lease and cloud-owned node role.
Evidence
Static and focused proof:
node scripts/check-changed.mjsnode scripts/run-vitest.mjs src/cli/connect-cli.test.ts src/pairing/setup-code.test.ts src/gateway/worker-environments/node-worker-tunnel.test.ts extensions/crabbox/src/crabbox-worker-provider.test.ts— 168 tests passed on the rebased headpnpm buildautoreview --mode branch --base origin/main— clean58108341673: resumed nodes use hidden process-scopednode run --ephemeralwith no durablenodeHost.workerRunsmutation; every mode-bound allocation requires an explicit providersupportedExecutionModesdeclaration; and pairing-role retirement now requires the durable cloudnodeSetupId, so ordinary paired-device teardown cannot revoke its node role. The teardown regression demonstrably failed on the prior lifecycle and passes with the ownership gate.WorkerProviderwas introduced after stable tagv2026.7.1-2, no stable tag contains that Plugin SDK surface, and OpenClaw's beta-only SDK rule carries no compatibility obligation. Direct lifecycle-onlyenvironments.createremains available when no placement mode is requested.Live AWS proof through the real Gateway flow:
placement.state=activewith a connected tunnel.openai/gpt-5.6-solworker turn on AWS. The model invoked the shell tool in the remote workspace, createdworker-proof.txt, and returnedDONE.worker-proof.txtlocally with exact contentscloud node turn completedand advanced the workspace manifest.destroyed,node.listempty,device.pair.listwith no pending or paired devices, andcrabbox list --provider awswith no active leases.The installed local Crabbox CLI does not implement the newer heartbeat command, so the live Gateway emitted a bounded warning during the short proof. It did not affect placement, execution, reclaim, or teardown; upgrading the external CLI is independent of this OpenClaw change.