Conversation
Contributor
Author
|
Closes #448 |
gaelcado
force-pushed
the
feat/unified-updates
branch
from
September 30, 2026 08:33
58be16c to
12a896c
Compare
gaelcado
force-pushed
the
feat/unified-updates
branch
from
October 1, 2026 09:33
12a896c to
e002050
Compare
Zeron engines (`engine-updates-v1`): Watch/Check/Start/CancelEngineUpdate, relay-forwardable so any device can be targeted. The engine owns each operation: closing a window or losing the relay never cancels it, and a retried requestId joins the running operation. New runs, terminals and agent CLI updates take a restart admission ticket; a restart only closes admission when none is outstanding and nothing is running. Only supervised engines restart, through launchd/systemd; hand-started ones report "restart required". Updated is reported only when the restarted engine runs the target version. Automatic behaviour is the same operation: ZERON_AUTO_UPDATE installs, and a supervised engine restarts into a binary someone else installed (the desktop app swapping its bundle, `zeron update`), once per installed version. The release checker only reports; its own stage/apply/restart path is gone. An operation interrupted before it installed anything is forgotten on restart, a settled outcome is not judged again, and it is dropped once the engine runs another version. An unusable cached download is replaced instead of blocking the release. UpdateStatus is unchanged; legacy ApplyUpdate now refuses and points at StartEngineUpdate, since it restarted without waiting for idle. Agent CLIs: every update stays bound to the installation Zeron launches. - OpenCode upgrades with `--method curl|npm|pnpm|bun` for the layout of the running binary. A bare `opencode upgrade` beside a Homebrew keg picked Homebrew and no-oped for the standalone copy. - A check records the launcher, resolved file, size, mtime, Homebrew package and npm package it described. Apply and the install step refuse a different copy and re-check instead. - Verification fails when Zeron would now launch another file (for a managed archive: anything but the release it just installed) or the update left an older version. Version and discovery caches are invalidated after every install attempt, including harness installs. - Agent installs and updates share one installer lease, since several agents can live in one Homebrew or npm installation. It is taken after the agent's own runs have drained, so a busy agent does not hold up the others. - A launcher under /opt/homebrew/bin that links elsewhere is not labelled Homebrew; a Codex launcher pinned to one release stays manual. - Failure messages keep the installer's tail, without Homebrew 7's list of unrelated untrusted taps. - Executable selection follows PATH and override order like launches, instead of switching to whichever duplicate reports a newer version. Desktop: the Home card covers Zeron engines and agent CLIs on every device, re-asks devices whose state is missing or stale, and gets a dismiss button that never hides progress or failures. Settings -> Updates lists every installation by device, including current, offline and remotely non-updatable ones, with instructions and installation details. A refused action shows its reason on its own row, on Home and in Settings. Older engines get one-time `zeron update` instructions instead of an unsafe apply; a device dropping mid-restart shows Reconnecting, then says it has not come back after 3 minutes.
gaelcado
force-pushed
the
feat/unified-updates
branch
from
October 1, 2026 12:50
e002050 to
08ce102
Compare
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.
Why
opencode upgrade. OpenCode's own probing then picked Homebrew, and the update was a successful no-op for the binary that actually runs.What changes
Zeron engines (
engine-updates-v1)Four relay-forwardable methods, so any device can be targeted.
UpdateStatusis unchanged. The legacyApplyUpdatenow refuses and points atStartEngineUpdate, because it restarted without waiting for idle; nothing in the desktop app called it.WatchEngineUpdateCheckEngineUpdateStartEngineUpdaterequestIdjoins the running operation.CancelEngineUpdateZERON_AUTO_UPDATEinstalls go through it. So does the restart of a supervised engine whose binary someone else replaced (the desktop app swapping its bundle, orzeron update); that restart is tried once per installed version. The release checker now only reports, and its separate stage/apply/restart path is removed.Agent CLIs: update the copy that runs
Installer ownership (Homebrew, npm, vendor updaters, Antigravity archive) is unchanged from
main. This adds:--method curl|npm|pnpm|bun, matching the layout of the binary that runs./opt/homebrew/binbut links elsewhere is no longer labelled Homebrew. A Codex launcher that points straight at onereleases/<version>is treated as pinned and stays manual.Desktop
ApplyUpdaterestarts without waiting for idle, so they get one-timezeron updateinstructions instead of a button.docs/updates/support-matrix.mddescribes what each kind of installation gets.Testing
Tested at
08ce1021on macOS 27.0 arm64, a single commit onmain(42926c80):cargo test -p zeron-engine --lib: 413 passed, 2 ignoredcargo test -p zeron-harness -p zeron-proto -p zeron-update -p zeron-rpc --lib -- --test-threads=1: harness 314, proto 52, update 21, rpc 16 passedcargo test -p zeron-ui --lib -- --test-threads=1: 1,402 passedcargo check -p zeron: passes--methodfor a standalone copy beside a Homebrew keg;cargo fmt --all -- --checkreports the same pre-existing differences asmain, and none in the files changed here beyond those.Not verified yet
Contract names (
engine-updates-v1, the method names,EngineUpdateStatefields) are a proposal. iOS is unchanged and can adopt them later.Closes #448. Related: #389, #595.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.