Legacy → rewrite cutover: the ao update migration flow #231
harshitsinghbhandari
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How an existing legacy user moves from the legacy stack to the rewrite (Go backend + Electron app), end to end. This is the runtime flow; the npm packaging mechanics are in #229, and the data import/reconcile is coordinated separately with the legacy side.
Two version numbers
The migration code has to be on the machine before it can run, so there are two releases in play:
ao update.@aoagents/ao, new version. This is the Go+Electron rewrite that gets installed.Path for a user on 0.9.5:
ao update→ lands on 0.9.6 (a normal in-place legacy update; no migration yet, it just delivers the smarterao update).ao updateagain → 0.9.6's logic sees the cutover is available and performs the migration to 0.10.0.(0.9.6 can chain straight into the cutover so it feels like one step, but "must be on 0.9.6 first" is unavoidable since the migrating code ships in 0.9.6.)
ao updatepins the exact cutover version (@aoagents/ao@0.10.0), it does not chase@latest, so every migrating user lands on the same tested version.What
ao updatedoes, in order--force-migrate.~/.ao/backups/legacy-<timestamp>/(legacy flat files + a copy of any priorao.db+ the old pipelines dir for forensics).npm install -g @aoagents/ao@0.10.0(or pnpm/bun equivalent). Its postinstall lays down the ~20 MB Go binary + CLI.claudeSessionUuid,codexThreadId+codexModel,opencodeSessionId) so sessions resume./healthz,/readyz).After cutover — how it runs
ao start→ starts the Go daemon only. Headless; the CLI works fully without the GUI.So CLI-only users never need the GUI in their way, but the 254 MB app is already on disk and one command away.
Why the Electron app is fetched separately (not via npm)
Measured built sizes (darwin/arm64, on current
main):Pushing a 254 MB app through npm per platform would mean ~1 GB+ of registry artifacts per release and a 254 MB download for every install, with no delta updates. Electron's own auto-update does binary deltas; npm does not. So:
Summary of decisions captured here
ao update; cutover target is 0.10.0 (rewrite), same package name, pinned (not@latest).ao update= refuse-if-active → guard → confirm → backup → install rewrite → fetch Electron → import (with resume IDs) → health-check → rollback on failure.ao startruns the daemon only; opening the GUI is a separate command.Related
@aoagents/ao(Go + Electron via npm), postinstall vs optional-deps, platform matrix.Beta Was this translation helpful? Give feedback.
All reactions