Skip to content

Ship OpenClaw as the seed for a self-updating copy under ~/.openclaw - #651

Merged
spencerbull merged 1 commit into
masterfrom
openclaw-self-updating
Oct 3, 2026
Merged

spencerbull merged 1 commit into
masterfrom
openclaw-self-updating

Conversation

@spencerbull

@spencerbull spencerbull commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

This package installed OpenClaw into /usr/lib/node_modules/openclaw, where pacman and root own it and upstream's updater refuses to write, so neither openclaw update nor the Control UI's Update Gateway worked on an Omarchy machine. /usr/bin/openclaw also came ahead of any user-owned copy on Omarchy's PATH.

It now carries the release instead of running it: the npm tarball, still sha256-pinned and still on the fast ring with its 24-hour release age, at /usr/share/openclaw/openclaw.tgz, beside the install-cli.sh that came inside it and the Control UI icon the web app uses. omacom/omarchy#13296 seeds a self-updating copy under ~/.openclaw from exactly that tarball with that installer, and moves an existing install and its gateway service there. The installer brings its own Node, so nodejs is no longer a dependency; git is, because the installer would otherwise try to install it with sudo, and curl is what it downloads with. On upgrade the scriptlet says OpenClaw runs from ~/.openclaw and updates itself, and that omarchy update moves one still running from /usr there. It says the same whichever release a machine is leaving, since the upstream sync moves the version and which earlier releases were the runtime cannot be read from it.

This lands after omacom/omarchy#13296. On its own it would remove the runtime under a running gateway, with nothing on the machine to move it to ~/.openclaw.

🤖 Generated by Fable 5.1 in Claude Code. Reviewed by Codex XHigh.

@spencerbull

Copy link
Copy Markdown
Contributor Author

End-to-end review of 39a1bc5: this branch's openclaw 2026.9.5-2, built locally from it and served from a local repo on four disposable Omarchy workers, together with omacom/omarchy#13296 dev-linked. CI here built it on both architectures and it contains only /usr/share/openclaw/{openclaw.tgz,install-cli.sh,openclaw.png} and the license.

The package does what #13296 needs from it: on a clean machine the tarball and installer seeded ~/.openclaw at 2026.9.5, which then updated itself to 2026.9.6 from both openclaw update and the Control UI. On a machine with 2026.9.4-1 installed and its gateway running, the upgrade removed /usr/bin/openclaw and the old tree, printed the one-time notice (vercmp against 2026.9.5-2), and #13296's migration moved the install and its gateway to ~/.openclaw, after which the Control UI that had failed with EACCES updated to 2026.9.6. A reinstall after removal printed the post_install text and reused the kept runtime.

Screenshots and logs: https://gist.github.com/spencerbull/28a59f7434d54e7a993a640924b873e1

Second opinion: Codex at xhigh reviewed this with #13296 across five passes. Its one finding here was curl listed as optional after becoming a dependency, since removed. Codex could read this session, so its agreement is not independent.

This has to land after #13296: on its own it removes the runtime under a running gateway with nothing on the machine to move it. Waiting on the maintainer.

🤖 Generated by Fable 5.1 in Claude Code. Reviewed by Codex XHigh.

A copy under /usr/lib/node_modules belongs to pacman, and upstream's updater refuses to write there, so neither `openclaw update` nor the Control UI's Update Gateway worked. The package now carries the release instead: the sha256-pinned npm tarball and the install-cli.sh that came in it, from which Omarchy seeds a copy under ~/.openclaw that updates itself.
@spencerbull
spencerbull force-pushed the openclaw-self-updating branch from 39a1bc5 to a696e31 Compare September 28, 2026 04:48
@spencerbull

Copy link
Copy Markdown
Contributor Author

Second end-to-end review, of a696e31 with omacom/omarchy#13296 at 9ace84e6, on Proxmox workers built from the Omarchy ISO template. Each worker was dev-linked to current quattro (3faafba2) merged with #13296, which is the tree that would land, with this branch's openclaw built locally and served from a repo ranked ahead of [omarchy]. Three rounds ran. The first two found problems, which are fixed on both branches, and the third is clean.

Found and fixed here

  • The branch had fallen behind master, where the upstream sync had meanwhile published 2026.9.6-1, still the package that runs OpenClaw from /usr. 2026.9.5-2 conflicted and would have sorted below it, so pacman would never have moved anyone onto the seed. The branch is rebased onto master (bcdd786) and ships 2026.9.6-2. vercmp puts that above 2026.9.6-1, and the sync bot's next bump (2026.9.7-1, pkgrel reset) above this; that was checked by running bin/sync-upstream openclaw on a scratch copy.
  • post_upgrade chose its message with vercmp "$2" 2026.9.5-2. A machine leaving 2026.9.6-1 compares higher than that, so it would have been told nothing was moving. The threshold goes stale every time the sync moves pkgver, so the message is now one text that is true whichever release a machine is leaving.

Found and fixed in #13296 (details there)

  • The 2026.9.6 installer keeps the Node a gateway unit already ran. So a migrated gateway ran the runtime's code on the /usr/bin/node that this package no longer depends on. It is now pinned to the runtime's own Node.
  • The keyboard break at the channel search reported on saber. Onboarding's watcher probes the gateway once the wizard has written its config. A probe killed by its 10 s timeout took the wizard's terminal out of raw mode, and the wizard never set it back. The probes now read /dev/null. Unfixed, the second key typed at the channel search is echoed under the prompt; fixed, it reaches the search:

Round 3, all passing. Upstream's latest is also 2026.9.6, so cases D and E use this PKGBUILD pinned to 2026.9.5 to show a real update.

Case Result
A. Another openclaw first on PATH --now refuses; no package, no ~/.openclaw, no link
A. Setup > Default Agent in Ghostty seeds ~/.openclaw from the tarball. At the channel search o, 14 s past a probe timeout, then p: search reads op, terminal stays raw, and strace shows nothing but the wizard changing its mode. TUI connects; openclaw update already current
B. Install > AI web app installed; Control UI served from ~/.openclaw on 2026.9.6
C. Published 2026.9.6-1, gateway running (openclaw update: global-install-foreign-destination) upgrade prints the new message and removes /usr/bin/openclaw. Migration in 46 s: gateway active on ~/.openclaw/tools/node-v24.19.0/bin/node, config kept, Control UI loads
G. Same, gateway stopped and disabled by the user moved onto the runtime's Node, still stopped and disabled
D. Default agent, then openclaw update in a terminal 2026.9.5 → 2026.9.6, gateway restarted on it
E. Install > AI, Update Gateway in the Control UI 2026.9.5 → 2026.9.6; Remove > AI keeps the runtime with the data; Install > AI again reuses 2026.9.6

Tests

  • CI on a696e31: native builds on x86_64 and aarch64, build-isolation and self-tests all pass.
  • This repo's own tests, run locally: bin/sync-upstream self-test, bin/omarchy-pkgs self-test, tests/upstream-watch.py, tests/pinned-sources.sh and tests/published-build-plan.sh pass.
  • Omarchy's test/all on the merged tree with OMARCHY_PKGS_PATH pointing here: 4010 pass. Four fail, and they fail identically on untouched quattro: vscode theme reference, linux-omarchy headers, passwordless-grant pre_remove, omarchy-iso checkout. Every OpenClaw suite passes: openclaw-cli 19, openclaw-onboard 13, remove-ai 32, default-agent 48, launch-openclaw 8.

Not covered: omarchy-migrate on the template stops at an unrelated older migration, so the OpenClaw migration was run directly. Onboarding was completed non-interactively, since the wizard needs a real model sign-in; the channel-step checks drove the interactive wizard up to that point.

Every screenshot, the six scenario logs, the strace record of the channel search before and after, and the test output: https://gist.github.com/spencerbull/a0c56fd1f22abfcd1f3446d58303f913

Second opinion: Codex at xhigh reviewed this rebased package (no defects found) and each #13296 fix as it landed, over six passes. Three of its findings were declined, with reasons in the #13296 comment. Codex runs on the same machine and could read this session, so where it agreed, that agreement is not independent.

Lands after omacom/omarchy#13296, as before. Waiting on the maintainer.

🤖 Generated by Fable 5.1 in Claude Code. Reviewed by Codex XHigh.

@spencerbull
spencerbull merged commit f6b9267 into master Oct 3, 2026
7 checks passed
@spencerbull
spencerbull deleted the openclaw-self-updating branch October 3, 2026 02:21
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Publish succeeded → live

Packages: openclaw (x86_64, PR artifact); openclaw (aarch64, PR artifact)

  • edge/x86_64: openclaw-2026.9.6-2-x86_64
  • edge/aarch64: openclaw-2026.9.6-2-aarch64
  • rc/x86_64: openclaw-2026.9.6-2-x86_64
  • rc/aarch64: openclaw-2026.9.6-2-aarch64
  • stable/x86_64: openclaw-2026.9.6-2-x86_64
  • stable/aarch64: openclaw-2026.9.6-2-aarch64

Commit f6b9267 · run

spencerbull added a commit that referenced this pull request Oct 4, 2026
This reverts f6b9267 (#651), at pkgrel 3 so it replaces 2026.9.6-2. OpenClaw rides the fast ring, so the seed package went straight to edge, rc and stable, where omarchy is still 4.0.4: nothing there seeds ~/.openclaw or moves an existing install, so every OpenClaw user lost the openclaw command on their next update while 4.0.4's --check went on calling it installed. The seed comes back with the Omarchy release that carries omacom/omarchy#13296.
spencerbull added a commit that referenced this pull request Oct 6, 2026
This reverts fe15488 (#796), restoring #651's recipe exactly with pkgrel 4 so it replaces the runtime rollback's 2026.9.6-3. The package carries the release a self-updating OpenClaw under ~/.openclaw starts from, which only an Omarchy carrying omacom/omarchy#13296 and omacom/omarchy#14212 can set up.
spencerbull added a commit that referenced this pull request Oct 11, 2026
Restores #651's recipe and install script exactly, at the 2026.9.9 release master now tracks and pkgrel 2 so it replaces the runtime package's 2026.9.9-1. The package carries the release a self-updating OpenClaw under ~/.openclaw starts from, which only an Omarchy carrying omacom/omarchy#13296 and omacom/omarchy#14212 can set up. The tarball has to be at least as new as any OpenClaw a user has already run: an older one refuses the state a newer one migrated.
spencerbull added a commit that referenced this pull request Oct 13, 2026
Restores #651's recipe and install script exactly, at the 2026.10.1 release master now tracks and pkgrel 2 so it replaces the runtime package's 2026.10.1-1. The package carries the release a self-updating OpenClaw under ~/.openclaw starts from, which only an Omarchy carrying omacom/omarchy#13296 and omacom/omarchy#14212 can set up. The tarball has to be at least as new as any OpenClaw a user has already run: an older one refuses the state a newer one migrated.
spencerbull added a commit that referenced this pull request Oct 13, 2026
Restores #651's seed at the 2026.10.1 release master now tracks, at pkgrel 2 so it replaces the runtime package's 2026.10.1-1. The package carries the release a self-updating OpenClaw under ~/.openclaw starts from, which only an Omarchy carrying omacom/omarchy#13296 and omacom/omarchy#14212 can set up. The tarball has to be at least as new as any OpenClaw a user has already run: an older one refuses the state a newer one migrated.

Since 2026.10.1 upstream's install-cli.sh loads install-policy.sh from beside itself, and #651's recipe shipped only install-cli.sh, so every setup failed with "install-policy.sh: No such file or directory". The package now ships every install-*.sh in the tarball, and the build fails if install-cli.sh loads a helper it does not ship, so the next one upstream adds stops this build instead of users' updates.
spencerbull added a commit that referenced this pull request Oct 13, 2026
Restores #651's seed at the 2026.10.1 release master now tracks, at pkgrel 2 so it replaces the runtime package's 2026.10.1-1. The package carries the release a self-updating OpenClaw under ~/.openclaw starts from, which only an Omarchy carrying omacom/omarchy#13296 and omacom/omarchy#14212 can set up. The tarball has to be at least as new as any OpenClaw a user has already run: an older one refuses the state a newer one migrated.

Since 2026.10.1 upstream's install-cli.sh loads install-policy.sh from beside itself, and #651's recipe shipped only install-cli.sh, so every setup failed with "install-policy.sh: No such file or directory". The package now ships every install-*.sh in the tarball, and the build fails if install-cli.sh loads a helper it does not ship, so the next one upstream adds stops this build instead of users' updates.
spencerbull added a commit that referenced this pull request Oct 18, 2026
Restores #651's seed at the 2026.10.4 release master now tracks, at pkgrel 2 so it replaces the runtime package's 2026.10.4-1. The package carries the release a self-updating OpenClaw under ~/.openclaw starts from, which only an Omarchy carrying omacom/omarchy#14212, whose migration 1792334754 makes the move, can set up. The tarball has to be at least as new as any OpenClaw a user has already run: an older one refuses the state a newer one migrated.

Since 2026.10.1 upstream's install-cli.sh loads install-policy.sh from beside itself, and #651's recipe shipped only install-cli.sh, so every setup failed with "install-policy.sh: No such file or directory". The package now ships every install-*.sh in the tarball, and the build fails if install-cli.sh loads a helper it does not ship, so the next one upstream adds stops this build instead of users' updates.
spencerbull added a commit that referenced this pull request Oct 18, 2026
…#797)

* Ship OpenClaw as the seed again, at 2026.10.4-2

Restores #651's seed at the 2026.10.4 release master now tracks, at pkgrel 2 so it replaces the runtime package's 2026.10.4-1. The package carries the release a self-updating OpenClaw under ~/.openclaw starts from, which only an Omarchy carrying omacom/omarchy#14212, whose migration 1792334754 makes the move, can set up. The tarball has to be at least as new as any OpenClaw a user has already run: an older one refuses the state a newer one migrated.

Since 2026.10.1 upstream's install-cli.sh loads install-policy.sh from beside itself, and #651's recipe shipped only install-cli.sh, so every setup failed with "install-policy.sh: No such file or directory". The package now ships every install-*.sh in the tarball, and the build fails if install-cli.sh loads a helper it does not ship, so the next one upstream adds stops this build instead of users' updates.

* Take OpenClaw off the fast ring

The fast ring builds a package straight into edge, rc and stable, which is what put the seed in front of every channel's Omarchy 4.0.4 at once and left OpenClaw users without the openclaw command. The seed only works with the Omarchy that sets it up, so it now builds in edge and reaches rc and stable through the release train with that release. It stays on the auto-merge lane: upstream releases still arrive through the npm watch and its 24h age, now into edge first, and the runtime under ~/.openclaw updates itself whatever the package's channel.

* Check the seed's installer by loading it, not by reading it

Matching one spelling of `source` missed a helper loaded another way or by install-policy.sh itself, and rejected a match inside a heredoc. Running the shipped install-cli.sh --help from the package directory loads every helper it needs at start, however it names them, and touches nothing else.

Co-Authored-By: Codex XHigh <noreply@openai.com>

---------

Co-authored-by: Codex XHigh <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant