Skip to content

update: stage the complete release while Home runs, then stop once (#108, #110) - #246

Merged
andersalm merged 5 commits into
developfrom
fix/108-stage-before-stop
Oct 6, 2026
Merged

andersalm merged 5 commits into
developfrom
fix/108-stage-before-stop

Conversation

@andersalm

Copy link
Copy Markdown
Contributor

Part of #89, #108, #110. Sasha's findings 1, 3 and 4 on #110 (comment 6000349836): the controller stopped Home before downloading, so System showed 'Reconnecting…' during the 88 MB download and a network loss restarted Home for nothing.

Runtime now downloads, verifies and prepares the complete signed release (binary, components.json and changed support files) while Home keeps running, records the support set in the recovery journal, and only then stops Home, activates and restarts it once. Any failure before activation leaves Home running and unchanged; a failed start still restores the previous release. System shows the download size and verification progress, and plain messages for no network ('Home could not reach the update source…'), a cancelled passkey ('You cancelled the update. Home is unchanged.') and a refused release, with no raw error text.

Net +1,485 lines (production about +820, tests about +665). Targeted tests: home_update:: 15, stage_before_stop 1, staged_support 4, update_controller 55, install_transaction 54, System JS 24. Overlaps #244 in install_transaction.rs and update.rs; whichever merges second rebases. Written by a Codex session; Claude review.

The controller stopped Home before fetching, so System showed
'Reconnecting...' during the download and a network loss restarted Home
for nothing. Runtime now downloads, verifies and prepares the complete
signed release (binary, components and changed support) while Home keeps
running, journals the support set for recovery, and only then stops Home,
activates and restarts it once. System shows download size and
verification progress, and plain messages for no network, cancelled
passkey and refused releases (Sasha's #110 findings 1, 3, 4).

Written by a Codex session (gpt-6.1-sol).
Review fixes: staging skips home components that have no build for this
platform (as setup does), so macOS updates are not refused; the recovery
plan records its support path set so a restored release verifies against
the same paths and the previous Home restarts; and activation checks the
journaled support originals before any release file is renamed.

Written by a Codex session (gpt-6.1-sol).
The candidate reads the journal its older controller wrote; that plan has
no support_paths, and the strict parser refused it, so every update into
this release would have rolled back. Default the field and omit it when
empty. Found by the Claude review.
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