Repository navigation
feat(deploy): keep factory node satellites on the deployed build - #33
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Factory node satellites (the Linux build nodes and the Mac) don't follow a Gateway deploy. The node on the Gateway host keeps running the old CLI until someone restarts it. The 3090 node runs a packed copy of the CLI and needs a manual copy, unpack and restart after every deploy. A node that lags behind its Gateway works only as long as the node protocol happens to stay compatible.
Solution
New
scripts/deploy-satellites.shwith two phases, run fromsync-and-deploy.sh:deploy:globally, so it overlaps the preflights, cutover and smoke. It stages the new build next to each running node. Forlinux-tarballsatellites it packs the global install once, copies it over SSH, and unpacks it into~/.local/lib/openclaw.next.agent.cli.claude.run.v1. A node that fails the check is rolled back to the previous build.~/logs/satellites/.macos-sourcesatellite (its native addons differ from Linux) shallow-fetches the deployed commit into~/factory/openclaw-src, runspnpm installandpnpm build, and installs withnpm i -g . --install-links --prefix ~/.local/openclaw.next. On activate,~/.local/openclawis swapped in and the node process is killed; launchd KeepAlive restarts it on the new build, because the wrapper puts~/.local/binfirst on PATH. No admin rights are needed on the Mac.~/.config/openclaw-deploy/satellites.conf(<node name> <kind> <target>), so adding a node needs no commit. Kinds:local-systemd(a node on the Gateway host, restarted after the deploy),linux-tarballandmacos-source.local-systemdhas no rollback: that node shares the Gateway's global install, which the deploy already moved forward. A failure there surfaces as a satellite warning.exit. A login shell'sexitbuiltin runs~/.bash_logout, whoseclear_consolefails without a terminal and turnedexit 0into a failure.Impact
Fork-only deploy tooling; no product code. Without a satellites file, the deploy behaves as before. With one, it takes about 20 s more after the smoke test (activate), because prepare already ran during the host deploy.
Evidence
Run on the Gateway host against
linux-factory-minisforum790(local-systemd) andlinux-factory-minisforum3090(linux-tarball):47c7502, and the Gateway seesagent.cli.claude.run.v1andfile.fetch..bash_logoutissue; it's fixed.192.0.2.1) failed only its own prepare. The other satellite succeeded and the script exited 1.cec72ae13e0and covered by the broken-build test.mac-factory-florians-macbook-pro): prepare-source took 7 min 50 s, includingpnpm build(3 min 54 s) and the shallow fetch plus install. Activate moved the node from the admin-owned/opt/homebrewbuild82876a2to~factory/.local/openclawat47c7502in about 10 s. The Gateway seesagent.cli.claude.run.v1,file.fetchandsystem.run.--depth 1fetch of the one commit (c3f0489419e).local-systemdrollback. That's by design (above) and now documented in the script.sync-and-deploy.shwith the hook. It runs on the next deploy.🤖 Generated with Claude Code