Repository navigation
feat: add OctoSense updater with stable, RC and preview channels - #446
Conversation
# Conflicts: # README.md # README.zh-CN.md
From the review of #446: - A desktop release is offered only when its SHA256SUMS carries GitHub's signature from the new sign-desktop-release workflow, run on main in the desktop-release-signing environment, whose reviewers approve each run: the model App Hub uses for its catalog. GitHub's digests and SHA256SUMS alone only prove the files are the release's own; anyone who can publish a release can make them agree, and updater downloads skip the warnings macOS and Windows give a browser download. signature.rs verifies the Sigstore bundle offline (certificate, timestamps, transparency log, GitHub's claims, the subject <tag>.SHA256SUMS with its exact digest), with the same pinned Sigstore crates as App Hub. Android Home keeps its pinned APK signer instead. - A release page may hold 100 releases of up to 160 KiB each. At 2 MiB a page, every check failed once the repository had about 73 releases (28 KiB each today), and installed updaters could not have fetched a fix. The ten-page limit now stops reading instead of failing. - Stale downloads are removed when the shell starts and before each check: verified ones a day after their last write, interrupted ones after an hour; only the updater's own pending-/verified- folders of plain files, never recursively. - Android's Install and Allow buttons now read their clicks while the tap is being handled (capture_actions, press and release), as the host's other approval sheets do. Read from Event::Actions, trusted_user_input() was always false, so both buttons always refused. - Linux packages are handed over from the Downloads folder: a snap package handler (Ubuntu's App Center) cannot read ~/.octosense, and an AppImage's owner must find it. The copy never replaces a file and is checked against the release digest; an AppImage copy is executable. - docs/updater.md (en/zh): the signature, the corrected statement on OS download checks, cleanup, Linux handoff, what is verified. desktop/README (en/zh): the signing step before publishing. ci_local: the signing workflow is a release workflow it does not run. Tested: cargo test --locked -p octosense-updater -p octosense-updater-ui (43 + 8 pass); clippy -D warnings on both; cargo check --example updates; python3 tools/ci_local.py --check-drift and tools/test_ci_local.py; the workflow's release check, run read-only against the published desktop-v0.1.0-rc.5 and rc.2 (pass) and beta.2 (refused: no SHA256SUMS). Unverified: a signed release end to end (none is signed yet), Android's tap check on a device, the Linux handoff on a Linux desktop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
App Hub #210 adds `updater` to the contract's RESERVED_NAMES, so no store app may take the native Updates window's id or namespace (ADR 0004 §3). The shell test a_script_app_may_not_take_a_native_apps_id_or_namespace, which failed in phone.yml / home on this branch, checks that list against native-apps.json. The four App Hub crates, the [patch.crates-io] contract line and native-apps.json's App Hub source; in Cargo.lock only the five App Hub source lines. Between d86101d7 and 938e85e7 App Hub only published catalog 16 (data) and made that change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fixesAt the maintainer's request I reviewed this PR and pushed fixes onto it as fast-forward commits on top of 1. Desktop releases need GitHub's signature. GitHub's asset digests and
2. Release list size. At 2 MiB a page, every check would have failed after about 73 releases (28 KiB each today), and installed updaters could not have fetched a fix. A page may now hold 100 releases of up to 160 KiB each, and the ten-page limit stops reading instead of failing. 3. Downloads are cleaned up. Verified downloads are removed 24 hours after their last write, interrupted ones after an hour. This runs at startup and before each check, touches only the updater's own 4. Android Install and Allow buttons never worked. They read 5. Linux packages are handed over from Downloads. Ubuntu's App Center is a snap and can't read 6. The failing Home check. App Hub #210 (merged) reserves Tested:
Since this adds a workflow that ci-local cannot run, it merges only on a fully green GitHub check list. |
|
Local CI passed on 5f8e621 ( GitHub would run for this PR: desktop.yml, phone.yml, apps.yml, rom.yml. Merged on this local pass (macOS runner queue); GitHub CI runs on the merge commit on main.
Notes:
Native GitHub acceptance passed on the same head: embedded-browser.yml. |
OctoSense currently requires users to find and install each host release themselves. Add an OctoSense Updates native module to desktop and Home, including a Home Settings entry. A release build can check its channel, download a verified package, and explicitly hand it to the operating system.
rc.9 → rc.10 → stable, with no channel-switch downgrade. Desktop and Home use separate product tags.SHA256SUMS, private bounded downloads, cancellation, and revalidation before handoff. No account, model, App Hub capability or agent installation tool.Validation:
mobile-apps, and Home withmobile-apps(run fromphone/). These are compile checks, not Android installation tests.Limits: the emulator fixture does not include the full Rust Home UI. Actual installation from a released Home build and macOS/Windows/Linux app replacement remain unverified. This first version uses explicit checks and native installer handoff; macOS DMG and Linux AppImage replacement still require user steps. Existing desktop RC2/Home beta2 do not contain this updater, so users need one manual installation of a future release. Home release packaging also needs the API 33 minimum fixed by #431. This PR does not publish a release or merge other work.