7.9 KiB
Native updates
TeamsPeach updates only from published releases of the public Gitea repository https://git.eeee.moe/TeamsPeach/client. Branches, commits, Actions artifacts and drafts are never update sources. No credentials are needed. Repository/origin constants live in native/src/services/updates/source.rs; UI intents cannot supply arbitrary update URLs.
The Rust updater is native/src/services/updates.rs, with source validation in updates/source.rs and desktop handoff/publication in updates/helper.rs. It does not use a browser updater runtime. The native application's validated installation metadata and running paths determine capabilities, not a UI-supplied installed flag.
Checking and release selection
- Fetch the complete anonymous release list from
/api/v1/repos/TeamsPeach/client/releases?draft=false&limit=50&page=…. Validate pagination andX-Total-Count, bounded bodies, a 20-page bound and a 20-second total listing budget. Timeout, HTTP error, malformed/incomplete data and refused connections are errors, never “up to date”. - Ignore drafts and non-strict
v<SemVer>tags. Consider only greater versions: no same-version reinstall or downgrade; release candidates precede finals. Apply the saved channel policy. - Require
native-manifest.jsonfrom that exact release. Validate schema1, enginerust-slint, exact version, unique supported target/kind and filename pairs, safe basenames, positive bounded sizes and base64 SHA-512 values. The exact artifact must exist in the release with its declared size. - For Windows x64 NSIS and Linux x64/ARM64 AppImage targets, also require the target-specific YAML feed. Its version, single file, exact filename, size and SHA-512 must agree with the native manifest. Wrong-architecture assets, paths and renamed packages are refused. Metadata has a 60-second request timeout and 4 MiB size bound.
- An incomplete/invalid candidate is listed with a reason and an older complete eligible release may be offered. Network/HTTP failures do not become empty-success results. Downloaded bytes must pass the real size/hash verification before becoming installable; late/cancelled work cannot replace a newer operation's state.
Checks are scheduled 15 seconds after startup and every six hours, with an on-demand Information action. The native manifest is mandatory even when a legacy-compatible YAML feed exists: historical browser releases alone are not native update offers.
Channels
| Channel | Accepts |
|---|---|
preview (default) |
Published releases, including prereleases |
stable |
Releases neither Gitea-marked prerelease nor SemVer-prerelease |
Either prerelease marker makes a release preview. State distinguishes hidden newer preview releases from skipped incomplete builds. Machine codes/parameters are localized through the native catalog; technical details remain English and must not be interpreted by matching message wording.
Installation modes
| Installation | Native detection and behavior |
|---|---|
| Windows x64 NSIS | Valid native-installation.json receipt matching the running executable/target/version; verified package and explicit helper/installer handoff |
| Windows custom profile | Manual-only, reason custom-profile; no install that could relaunch on the wrong profile |
| Windows ARM64 | Manual-only, reason manual-target; never consume an x64 automatic feed |
| Linux x64/ARM64 AppImage | Valid APPIMAGE path; verified file replacement and explicit relaunch through the native helper |
| Windows ZIP / Linux tar.gz | Manual release-page notification; user replaces portable files |
| macOS | Manual package path, subject to real signing/notarization/distribution availability |
| Direct Android | Verified APK plus explicit platform installer permission/action, not silent installation |
| Store Android / iOS | System-distribution/store effect; never invent an in-app desktop installer |
| Development, isolated/test builds and simulator targets | Disabled; not production update evidence |
These modes describe implementation/acceptance contracts, not published availability or successful installed upgrades on all platforms. A native receipt is not the historical “uninstaller file exists” heuristic. Invalid receipts fail visibly. The helper must revalidate the handoff and owned destination, wait for application shutdown/lock release, preserve the profile, and never substitute arbitrary paths.
User confirmation and active sessions
Nothing installs or restarts automatically. Background downloads defer while a server session is active; interruption needs an explicit confirmation. Changing locale/theme or closing a settings page is not consent. Cancellation, download failure and verification failure leave the running installation usable and must not produce an installable success state.
UIDs, identities, nicknames, bookmarks, devices and chat history live outside the package. Updates must preserve them. Historical profile migration is a separate explicit, read-only import; an updater must not silently repurpose an old profile. Windows custom-profile runs remain manual-only because an installer relaunch can inherit the desktop shell's environment instead of the invoking process's profile override.
Packaging and publication requirements
Use Cargo xtask package and xtask verify-package from README with a real target triple and fresh output directory. Version authority is the Cargo workspace. Packaging requires the normal Skia/WebRTC build, native build receipt, actual platform packaging tools, required assets/licenses and target architecture checks. No publication/tagging or SDK installation is implicit.
A release must contain the native manifest, exact unrenamed target artifacts, and required target feeds. The updater's feed naming follows the version's first prerelease identifier (or latest for finals), with Linux architecture suffixes. Automatic package names are:
TeamsPeach-<version>-win-x64-setup.exeTeamsPeach-<version>.AppImageTeamsPeach-<version>-arm64.AppImage
Do not publish a manifest/feed whose size/hash differs from the uploaded bytes. Target outputs, signing results, build provenance and archive-verification reports must remain attributable to the actual build. Test-only packages are not release eligible. Unsigned/local package generation does not grant redistribution rights for retained assets and is not a store/notarization or production-release pass.
Verification scope and historical evidence
Native coverage lives in native/src/services/updates/tests.rs, updates/source.rs and helper tests. Acceptance must cover SemVer/channel selection, drafts, complete pagination, wrong target/kind/name, duplicate/unknown manifest fields, missing assets/feed, exact size/SHA-512, late answers/cancellation, locked/changed installation, active-session deferral, explicit interruption confirmation, helper publication and relaunch, and profile preservation. Unit/service tests do not establish a successful installed upgrade.
FEATURE_COMPATIBILITY.md records native Windows offline/package evidence. The recorded NSIS/ZIP artifacts were unsigned test-only packages; the installer was not executed and no native update feed/release was published. Installed updater/relaunch remains unverified without an isolated source-version → destination-version run proving the resulting executable hash/version and unchanged identity/preferences/history.
Historically, the removed browser updater used published Gitea releases, strict feed/hash checks, preview/stable channels and manual-only custom-profile Windows behavior. Its older test matrix exercised service downloads without installation; its manual Linux workflow targeted a disposable AppImage profile. Versions 0.1.1 and older had no self-updater and required manual replacement. Those observations explain migration/compatibility requirements; they do not establish native updater success. A Windows installation test still needs a separate disposable OS account or VM rather than a normal user's registered installation.