Repository navigation
feat(cli): prepare session-host onboarding - #125879
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 18, 2026, 7:05 PM ET / 23:05 UTC. ClawSweeper reviewWhat this changesThe PR adds a Merge readinessKeep open for maintainer release-scope review. Source inspection finds a coherent opt-in consent flow and strong supplied real-machine proof, but this read-only blobless checkout could not retrieve current-main source for the required final merge comparison. Priority: P2 Review scores
Verification
How this fits together
flowchart LR
A[Single-use join target] --> B[Connect command]
B --> C[Authenticated node pairing]
C --> D{Session-host consent}
D --> E[Durable node configuration]
E --> F[Background node service]
G[Exact-version bootstrap wrapper] --> B
Decision needed
Why: The PR deliberately expands durable worker-session hosting but defers its public activation, so release scope and operator-facing rollout cannot be inferred from source review alone. Before merge
Agent review detailsSecurityNone. PR surfaceSource +28, Tests +378, Docs +41, Other +216. Total +663 across 6 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land only as an explicitly approved, inactive preactivation step after an exact current-main merge check confirms that the durable-consent and service-install ordering remain intact; keep website emission and public wrapper activation as a later stable-release change. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR proposes a new opt-in onboarding capability rather than reporting broken current behavior. The supplied after-fix runs provide implementation evidence, not a bug reproduction. Is this the best way to solve the issue? Unclear: the source uses the existing configuration mutation and node-runtime owners, which is the right shape, but current-main source could not be retrieved to complete the required best-fix comparison. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d39a24c687f6. LabelsLabel changes:
Label 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
History |
|
Land-ready proof is complete on exact head The prior compatibility finding is covered by a real released binary: AWS run The supported flow is covered end to end by AWS run Local proof: 34 focused tests, shell syntax + ShellCheck, docs validation, full changed-file gate, |
|
Merged via squash.
|
* feat(cli): prepare session-host onboarding * fix(cli): gate session-host installer capability
What Problem This Solves
openclaw connect --servicecould pair and install a persistent node, but it had no explicit path to consent to full worker-session hosting. The existing one-paste commands also assume Node and npm are already installed, so the true fresh-machine path could not be prepared safely ahead of a stable release.Why This Change Was Made
This adds one explicit
--session-hostconsent boundary toopenclaw connect:nodeHost.workerRuns.enabled=truethrough the conflict-safe config mutation owner, and only then installs the node service;--ephemeralremains the separate provider-managed disposable-node contract;A dormant
scripts/connect.shwrapper prepares the later fresh-machine command without publishing or activating it. It installs one exact package version, verifies that the installed CLI advertises the required connect capabilities, passes the single-use join target through a private mode-0600 file, and invokesconnect --service --session-host. Unsupported exact releases fail before the target is handed off. The wrapper is not website-synced or emitted by the UI/CLI in this PR; those activation steps still require an explicitly authorized stable release and publish.Production/tooling LOC: +248 / -4. Tests: +397 / -19. Docs: +43 / -2. The growth is the new fresh-machine installer boundary plus explicit durable session-host consent; no config/schema/protocol compatibility path is added.
AI-assisted: yes. I reviewed the connect/config/service ownership, installed-CLI capability boundary, private target handoff, exact-version contract, failure ordering, and docs.
User Impact
Operators can explicitly enroll a foreground or persistent node as a worker-session host with
--session-host. Existingconnectandconnect --servicebehavior remains unchanged unless that flag is supplied.There is no public hosted
connect.shcommand yet. This PR only lands the tested wrapper and CLI contract needed for a later stable-release activation.Evidence
node scripts/run-vitest.mjs src/cli/connect-cli.test.ts test/scripts/connect-installer.test.ts— 34 tests passed.bash -n scripts/connect.sh— passed.shellcheck scripts/connect.sh— passed.pnpm check:docs— passed.node scripts/check-changed.mjs -- docs/cli/connect.md docs/plan/runners.md scripts/connect.sh src/cli/connect-cli.ts src/cli/connect-cli.test.ts test/scripts/connect-installer.test.ts— passed.git diff --check— passed.08de6cc5d4902f368f8f03782a2959da42012aeb— green.v2026.7.1-2installed from its exact release tag; its CLI lacked session-host support; the wrapper rejected it with an actionable error before contacting the join endpoint and did not print the target. Lease released; isolated state removed.v2026.8.1tag, real join URL, exact CLI installation, real user systemd service, durable paired-device auth and endpoint, preserved unrelated config, persisted worker consent,sessionHost=true, worker slots2/2, observed stop/unavailable and restart/reconnect, and bootstrap credential absent from the service command, config/state, wrapper output, and service logs. The temporary tag, service, Gateway, user, and state were removed; the lease was released.The wrapper tests additionally cover exact version forwarding, explicit prefix handling without
HOME, mode-0600 target handoff, target absence from child argv/output, cleanup on success/failure, missing capability flags, failed help probing, and rejection of moving/non-exact versions.