Skip to content

UP-04: Add the System update flow #110

Closed

Description

@andersalm

Part of #89.

Owner: Anders (@andersalm).

Depends on UP-03 (#109).

Done means

First goal (#89, 2 October): this is "M2 in Home". System shows an available update without the user asking (current and new version, publisher, what changes), installs it with one owner action and clear progress, and Home reconnects by itself after the Runtime restarts, showing the new version with the user's data in place. Failures read in plain words with one next step; no raw error lines appear on success.

Release acceptance: Each exposed feature works clearly from start to end, including recovery. Keep unfinished or confusing features hidden until their complete journey passes. Hiding a feature does not complete its task; source checks alone do not establish installed acceptance.

  • Check, stage, Restart and supported Undo use the same Runtime state as CLI/operator actions. (evidence: UP-07: Accept updates on Mac, Linux and Jetson #113 (comment))
  • The existing Home owner/passkey path approves staging/install and Restart, with release-changing actions bound to the exact release. Read-only checks remain separate. (evidence: UP-07: Accept updates on Mac, Linux and Jetson #113 (comment))
  • Progress, restart needed and failures are clear. Concurrent or replayed changes are rejected. Test: on alpha.15 → alpha.16 in System: progress names each step, the restart is shown, and a failure gives one plain reason and one next step. A second System tab and a replayed approval are refused (source test system_update_refuses_a_concurrent_tab_and_a_replaced_approval).
  • The ordinary UI journey and retained user state pass on the named candidate. (evidence: Anders, Mac, alpha.8 → alpha.9 through System, then Undo, Chat kept: UP-07: Accept updates on Mac, Linux and Jetson #113 (comment))

Activity

  1. added this to the 0.7.1 milestone on Sep 29, 2026
  2. self-assigned this
    on Sep 29, 2026
  3. andersalm commented on Oct 2, 2026

    @andersalm
    ContributorAuthor
  4. andersalm commented on Oct 3, 2026

    @andersalm
    ContributorAuthor
    • Operator takes #110 / PR229 from 14:20 UTC and owns current-develop/PR227 integration, holder/Mac CI repair and the System journey for the approved PR230 union. Update preserves its design and commit history and stops edits/pushes to fix/110-home-system-update.
    • Earlier PR227 CI and PR229 CI failed at plain apply. Their source-bound cause and cleanup receipts remain retained.
    • Current #109 proof binds local f3244aa4 / tree 05f9df0a, normally integrated develop e8d9564f: 514 changed-module Rust cases, 170 JS/Python cases, fresh all-target compile/Clippy, independent high and local Opus PASS.
    • Fresh f324 native signed install, authenticated initial Home, plain Carrier check/apply/repeat, all 12 refusals and complete owned cleanup PASS; result SHA-256 1d8d161b82098723655e6ec3432cf21a538f89c3afe941536b7f7b0ff166236b. Release review PASS. The new posted 227 review makes installer rerun/adoption an exact union dependency; that case is outside the prior initial/update receipt.
    • Current #109 publication proof supplies the Mac-only cache correction and gateway fixture repair, normal current-develop integration and terminal actual-ref gate/push PASS. PR227 stays draft while current review/CI and union installer adoption remain. Operator acceptance for UP-04: Add the System update flow #110 remains automatic update display, one owner action/progress, Runtime restart, Home reconnect, preserved data, clear recovery and temporary Carrier cleanup. Release owns exact union review/CI and installed Home/account/model/update before normal merge.
  5. andersalm commented on Oct 3, 2026

    @andersalm
    ContributorAuthor

    PR229 leaves one Carrier lifecycle limit.

    • Runtime retains and awaits the owned endpoint close across cancellation. The pinned Iroh close operation has no total timeout; the socket tests use a five-second limit, while a production hard bound needs a separately reviewed transport contract.
  6. SashaMIT commented on Oct 5, 2026

    @SashaMIT
    Contributor

    Update test on Sasha's Mac (Apple M5 Pro), 6 October: install.sh of 0.8.0-alpha.5 into a test HOME, account created, then System updated it to 0.8.0-alpha.6 with one passkey approval. Two runs, each on a fresh install. Both ended on alpha.6 with "Home is up to date." and update-controller/status.json phase updated.

    Setup note: the live publisher now serves alpha.6, so the install used a local stand-in for the publisher URL (--publisher-gateway http://127.0.0.1:…). It served only the signed alpha.5 head (QmNe8YuvPWGDd5M5wCFmcrLfdHQtQeYPdJrffS3TypNL2m, the prev_head_cid of the alpha.6 head), the alpha.5 release and its binary. install.sh verified signatures and checksums against the maintainer DID as usual. After install, sources.json gateways was set to https://elastos.elacitylabs.com, the value of a plain install. Result matched your run: 36 installed, 4 skipped.

    1. "Reconnecting…" during the download

    During the download System says "Reconnecting…", so the owner thinks the download has stopped. The update stops Home first and then downloads the 87.5 MB binary and components.json (elastos home output), so System has no status to read and pollRuntimeUpdate in capsules/system/browser/system.js shows its reconnect text.

    • Cause: UP-02: Stage one complete release #108 (stage and verify while Home runs, then one bounded stop).
    • Until then: the status names the step, for example "Downloading the update (88 MB). Home restarts when the update is ready."

    2. alpha.6 refuses three providers after the update

    On both runs the alpha.6 gateway log (update-controller/runtime.log) shows:

    WARN elastos::server_infra: Skipping media-provider because startup failed
    WARN elastos::server_infra: Failed to register Runtime-only protected-content decrypt provider: protected-content decrypt provider status has an unsupported version
    WARN elastos::server_infra: Failed to register Runtime-only protect provider: protect provider status has an unsupported version
    

    Under alpha.5 the same binaries registered (media-provider is installed but unconfigured, both protected-content providers registered).

    • alpha.5 and alpha.6 share source 252166bc and the same components.json (Qmc7L5JVD135stBjBpNNcsDq6K4DxUyWuM9LsaMx3YCd7N). The installed provider hashes match that manifest, so the update installed what alpha.6 ships.
    • The providers report 0.8.0-alpha.5. protected_content_runtime.rs (require_protect_provider_status, require_media_provider_status, and the decrypt check) and server_infra.rs compare against option_env!("ELASTOS_RELEASE_VERSION") exactly.
    • Effect: an update that changes only the Runtime turns off media and protected content, and Home says "Home is up to date." Your alpha.6 Home probably has the same lines.
    • Options: each release stamps every provider with its version, or the check uses a protocol version. Home also names a feature that is off after an update.

    3. Network loss after approval

    Wi-Fi off right after the passkey approval. The update stopped at "Fetching release head", Home restarted on alpha.5, and System said: "The update could not start. Your previous release is ready. Check the update again." With Wi-Fi back on, the next approval reached alpha.6.

    • The installation stays safe.
    • The message gives no cause and no clear action. Suggested: "Home could not reach the update source. Your current version is unchanged. Connect to the internet and select Update again."
    • Home stopped and restarted although nothing downloaded; UP-02: Stage one complete release #108 removes that restart too.

    4. Passkey cancel (from the code, not yet run)

    onRuntimeUpdateApply shows "The update could not start. Check the update and try again." when the owner cancels the passkey. Suggested: "You cancelled the update. Home is unchanged."

  7. andersalm commented on Oct 7, 2026

    @andersalm
    ContributorAuthor

    Real System flow passed on the published release: alpha.7 → alpha.8 approved with passkey, restart, Home back, Chat opens (Anders, Mac, 7 Oct). The low-disk refusal message was clear and kept the current version.

  8. andersalm commented on Oct 16, 2026

    @andersalm
    ContributorAuthor

    Done, closed with proof: installed System update flow on alpha.18 -> alpha.19 (Linux, twice): step texts in order (queued, checking, downloading 109.4 MB, verifying, "Restarting to finish the update. Home is usually back within two minutes.", "Home is up to date."), automatic reload (#89 6205121022); Anders's Mac alpha.19 -> alpha.20 in System and Jetson alpha.19 -> alpha.20 in System (#93 6206223387 and following); concurrent tab and replayed approval: system_update_refuses_a_concurrent_tab_and_a_replaced_approval (gateway_home_update/tests.rs:852). The cancel text flashing away moves to #392.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions