Skip to content

feat(gateway): launch workers on paired nodes - #123157

Merged
steipete merged 4 commits into
mainfrom
steipete/node-worker-launch-wire
Aug 14, 2026
Merged

steipete merged 4 commits into
mainfrom
steipete/node-worker-launch-wire

Conversation

@steipete

@steipete steipete commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Related: #122966

What Problem This Solves

Paired, session-capable devices can advertise an exact local worker build and receive durable launch credentials, but current main still stops before a device can host an agent turn. Operators therefore see an eligible device that cannot actually run the selected session.

Why This Change Was Made

This wires device placements through a node-owned tunnel handle and the durable node worker supervisor. Private launch, status, cancel, and workspace commands remain outside public node.invoke policy. The Gateway owns placement, claims, transcript, and reconciliation; the node owns its connected endpoint, local installation integrity, process tree, launch journal, and namespaced workspace.

The rebased implementation also repairs two lifecycle gaps found during final review:

  • A recreated Gateway tunnel rehydrates its workspace binding from the durable placement and validates both local and node workspace state before another turn can launch.
  • Tunnel startup timeouts stop the selected transport owner, and pending replacement starts are fenced so a late completion cannot install a handle after the caller failed.

The launch-only workspace fallback accepts only a clean, published, credential-free HTTP(S) Git checkout. Plain, dirty, unpublished, credentialed-origin, .worktreeinclude, submodule, and Git LFS workspaces return the explicit workspace-transport-pending boundary for the stacked authenticated-transfer PR.

No config option, Gateway protocol version, or SQLite schema version is added.

AI-assisted implementation; I understand and reviewed the launch, ownership, recovery, and workspace behavior.

User Impact

An enabled paired device can host a complete OpenClaw session turn: workspace setup, private supervised launch, public worker admission, Gateway-proxied inference, transcript commit, terminal status collection, and unchanged workspace reconciliation. A node-control WebSocket reconnect after launch acknowledgement does not duplicate or kill the turn, and Gateway restart no longer loses the workspace authority required by a later turn.

General dirty/plain workspace transfer remains in stacked PR #123280 and will be rebased after this PR lands.

Evidence

  • Post-rebase focused launch/supervisor/dispatch suite: 109 assertions passed across 14 files.
  • Lifecycle owner suite: 59 assertions passed for restart binding, timeout ownership, pending-start fencing, clone-fallback policy, and worker-turn recovery.
  • Production and test TypeScript lanes passed; exact-head CI is attached to the repaired head.
  • Private-QA pnpm build passed, including plugin SDK surface and Control UI production build.
  • Real Gateway + paired node + durable supervisor E2E passed on the repaired branch: device dispatch, Git clone, private launch, forced node-control reconnect after acknowledgement, public worker admission, inference, transcript commit, terminal receipt, and unchanged workspace reconciliation.
  • Structured branch autoreview: clean, no accepted/actionable findings.

Production delta: +2,324/-332 (net +1,992). Tests/test support: +3,782/-2,744 (net +1,038). Docs: +22/-19. The capability growth replaces the deliberate device-transport stop with the complete launch owner boundary and splits the previously oversized launcher suite.

@clawsweeper

clawsweeper Bot commented Aug 13, 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 gateway Gateway runtime size: XL maintainer Maintainer-authored PR labels Aug 13, 2026
@steipete
steipete marked this pull request as ready for review August 13, 2026 11:33
@steipete
steipete force-pushed the steipete/node-worker-launch-wire branch from f3c4873 to 2196e7c Compare August 13, 2026 12:37
@steipete steipete self-assigned this Aug 13, 2026
@steipete
steipete force-pushed the steipete/node-worker-launch-wire branch from 2196e7c to d40319e Compare August 13, 2026 17:14
@steipete
steipete force-pushed the steipete/node-worker-launch-wire branch from d40319e to 7d842f5 Compare August 14, 2026 00:24
Rehydrate durable workspace bindings after Gateway restart, fence timed-out node tunnel starts, and refuse incomplete clone fallback for submodule and Git LFS workspaces.
@steipete
steipete force-pushed the steipete/node-worker-launch-wire branch from 7d842f5 to 9c70de1 Compare August 14, 2026 00:46
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact head 9c70de1a11fbeceb82fef7cdb7fa506675c57a6a:

Final review repairs included restart-safe workspace rehydration, selected-transport timeout cleanup, pending-start cancellation fencing, strict worker handshake projection, and explicit refusal of clone fallback for submodule/Git LFS workspaces.

ClawSweeper has only published its acknowledgement and no review or Rank-up moves: list, so there are no pending review actions to apply or skip.

@steipete
steipete merged commit 438d035 into main Aug 14, 2026
144 of 146 checks passed
@steipete
steipete deleted the steipete/node-worker-launch-wire branch August 14, 2026 01:02
@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 14, 2026
* feat(gateway): launch workers on paired nodes

* docs(plan): track node worker launch wire

* fix(runners): restore node workspace ownership

Rehydrate durable workspace bindings after Gateway restart, fence timed-out node tunnel starts, and refuse incomplete clone fallback for submodule and Git LFS workspaces.

* test(runners): isolate node launch fixtures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant