Repository navigation
fix(installer): make install update and uninstall recoverable - #3889
Merged
Merged
Conversation
Add journaled maintenance with scoped elevation, integration rollback, safe uninstall and supervised updater handoff. Preserve recovery data, report native failures and guard frontend races. Harden CLI and SSH installation and select the standalone Windows maintenance installer for release assets. Validated with focused native, frontend, script and registry tests; full release-fast installer packaging; embedded payload hash verification; and isolated read-only native preview. Real UAC alternate-account and native cross-platform desktop scenarios remain unverified.
Restore the official crates.io updater and remove the vendored source and Cargo boundary exception. Use public client configuration for network stalls, and move Windows supervised installation, macOS bundle recovery and Linux publication/authorization into Desktop-owned adapters. Install verified cached packages without another server lookup. Keep native handoff, recovery and process/argument regression coverage in the adapter. Add a registry-dependency guard and update the five-minute SystemAPI assertion. Focused native tests (8 adapter, 10 updater, 9 registry), frontend tests (150), script tests (41) and core boundary checks passed; native UAC and non-Windows OS smoke coverage remain pending.
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.
Summary
Make install, update and uninstall failures recoverable without replacing the official updater dependency. Stage and verify managed files, serialize maintenance, journal file/integration changes and recover interrupted operations. Preserve user data, unknown files and unreadable recovery records.
tauri-plugin-updater2.10.1 from crates.io for discovery, download and transfer signature verification. Configure bounded connection/read stalls through its public API. There is no updater source copy, Cargo patch or special dependency-boundary exception.update_maintenanceadapters own Windows readiness/process-lifetime handoff, native failure receipts, original-token restart, macOS bundle recovery, Linux atomic AppImage publication and graphical package authorization. Re-verify the persisted version/hash/signature and install directly from cache without another server lookup.Type and Areas
Type: bug fix, regression coverage, release integration.
Areas: installer, desktop platform adapters, CLI/SSH provisioning, update UI and release workflows.
Motivation / Impact
A failed update must not strand mixed application files, erase the only recovery backup or quit the application before a native maintenance worker is ready. Uninstall must preserve user configuration, sessions, workspaces and unrelated files, and must not remove another installation's system integrations.
The native maintenance implementation belongs to Desktop, while the official updater retains its discovery/download/verification responsibilities. Service Docker contexts no longer need an extra vendored updater dependency. The existing SystemAPI test now matches the five-minute maintenance handoff timeout and continues to assert the confirmed version and zero mutation retries.
Verification
Rebased onto upstream
6c00f83e8. The adapter migration patch is unchanged bythat rebase; capability projections were regenerated to retain the new upstream
commands. Frontend, script and contract checks were repeated after the rebase.
The native tests and Windows debug build below were completed immediately before
that final synchronization.
After moving maintenance into Desktop and restoring the official dependency:
cargo build --locked -p openbitfun-desktop --no-default-features --bin openbitfun-desktop --offline -j 8: Windows desktop debug build passed.cargo test --locked -p openbitfun-desktop --no-default-features --lib --no-run --offline -j 8: passed.update_maintenancetests: 8 passed, including real Windows Job lifetime/argument parsing, safe raw/archived installer staging, AppImage validation and retained recovery backups.api::update_api::tests: 10 passed;remote_workspace_policy: 9 passed. Used a temporary copy of the library test executable with the repository's Windows manifest, as documented in the Desktop guide.pnpm --dir src/web-ui exec vitest run src/infrastructure/api/service-api/SystemAPI.test.ts src/infrastructure/update: 150 passed.node --test scripts/market/*.test.mjs scripts/updater-maintenance.test.mjs scripts/tauri-release-manifest.test.mjs scripts/desktop-tauri-build.test.mjs: 41 passed. Includes the previously failing Market build-context contract and the production PowerShell supervisor fault-injection fixture.Earlier verification on this repair series also passed installer native/frontend tests, CLI self-update/daemon tests, SSH protocol tests and Bash fixtures under WSL. A strict complete release-fast installer build, all 2,870 payload hashes and isolated read-only native preview were verified before this adapter migration; the complete installer package was not rebuilt for this revision.
Reviewer Notes
AI-assisted change with focused automated regression coverage. Native end-to-end platform coverage remains incomplete:
Recovery inventories/journals are additive. Unknown/corrupt records and failed recovery backups are retained rather than reset. Quiet maintenance distinguishes success (0), failure (1) and committed maintenance with cleanup pending (2).
Checklist