Skip to content

fix(installer): preserve legacy updates and allow parallel installations - #3944

Merged
kev1n77 merged 1 commit into
openBitFun:mainfrom
kev1n77:codex/installer-updater-legacy-compat
Nov 16, 2026
Merged

kev1n77 merged 1 commit into
openBitFun:mainfrom
kev1n77:codex/installer-updater-legacy-compat

Conversation

@kev1n77

@kev1n77 kev1n77 commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Repair Windows installation/update/uninstall compatibility and allow multiple installation directories to coexist while retaining existing installation scope and user data.

  • Treat an already-exited previous executable as a successful legacy update wait; keep genuine inspection/path errors visible.
  • Keep uninstall entrypoints on the uninstall path when /UPDATE is present. Preserve legacy /D=, /S _?=, and /R /ARGS behavior, including original-token restart and the application-argument boundary.
  • Share read-only Windows scope detection between Desktop and Installer. Recognize legacy HKLM registrations, request elevation for protected targets/maintenance locks, and snapshot/remove same-directory HKCU/HKLM duplicates without changing other installations.
  • Interpret native, NSIS, and MSI exit codes separately. Persist MSI reboot requirements and prevent an unnecessary repeat install.
  • Read caches without packageKind; verify checksum/signature and actual package format before atomically migrating metadata. Retain invalid/ambiguous cache data for recovery.
  • Remove transaction journals only after other cleanup succeeds. Use the same stable OS-backed lock for CLI shell installation and Rust self-update, including systems without the flock command.
  • Give parallel directories separate registrations/shortcuts and remove the installer UI's all-users switch. Existing machine installations retain their scope; copies continue sharing the existing user data directory.

Type and Areas

Type: bug fix / regression fix / upgrade compatibility.

Areas: Installer, Desktop/Tauri updater, CLI installer/self-update, services-core Windows integration, Web UI, installer locales and documentation.

Motivation / Impact

A legacy in-app update could fail with an empty “Cannot wait for the previous OpenBitFun version to exit” message after the old process had already exited. Other affected paths could select the wrong maintenance operation, fail before requesting administrator access, misreport installer results, reject otherwise valid older caches, or lose recovery state during cleanup. Installing into another directory also rejected the registered installation rather than supporting independent copies.

The changes retain old persisted fields and parameter contracts, add defaulted metadata where needed, and preserve installation/user data when validation or maintenance fails.

Verification

Passed locally on Windows unless stated otherwise:

  • Installer native regression suite: 44 passed, including the packaged-version fixture, already-exited legacy process, update handoff, parameter routing, registry/shortcut ownership, duplicate registrations, real ACLs, and cleanup fault injection:
    cargo test --manifest-path OpenBitFun-Installer/src-tauri/Cargo.toml --lib --jobs 1 --config 'profile.dev.package.openbitfun-installer.codegen-units=1' -- --include-ignored
    (OPENBITFUN_PACKAGED_VERSION_FIXTURE set to a local packaged Desktop executable.)
  • CLI self-update: 14 passed:
    cargo test --locked -p openbitfun-cli --bin openbitfun self_update::tests --jobs 1
  • Shared Windows scope detection: 1 passed:
    cargo test --locked -p openbitfun-services-core --no-default-features --features installed-apps --lib installation_scope::tests --jobs 1
  • Desktop update frontend: 153 passed:
    pnpm --dir src/web-ui exec vitest run src/infrastructure/api/service-api/SystemAPI.test.ts src/infrastructure/update
  • Installer frontend: 14 passed; installer type-check and frontend production build passed.
  • Packaging/update/Windows shell regressions: 23 passed, 1 Linux-only skip:
    node --test scripts/updater-maintenance.test.mjs src/apps/cli/install.test.mjs OpenBitFun-Installer/scripts/build-installer.test.cjs scripts/data-tools-tauri-build.test.mjs
    (OPENBITFUN_INSTALLER_FIXTURE set to the built native installer.)
  • Linux shell regression suite under Ubuntu WSL: 2 passed, exercising Perl, Python and native-helper fallback paths against an existing kernel lock and staging failure:
    node --test src/apps/cli/install.test.mjs
  • pnpm run check:web, pnpm run i18n:audit, pnpm run check:repo-hygiene, git diff --check, and the Git object-size check passed.
  • Core boundary checker passed against a snapshot of current repository sources/new files. Running it directly in this checkout was blocked by generated dependency symlinks; no checker rules or baselines were relaxed.
  • Installer production-feature build passed using the existing Desktop payload. A complete release containing a rebuilt Desktop payload was not produced.

Reviewer Notes

AI-assisted. Testing level: targeted automated verification with partial platform coverage.

The normal Desktop Rust test targets compile, but their Windows test executables fail before entering libtest with 0xc0000139 / STATUS_ENTRYPOINT_NOT_FOUND, matching the Tauri test-loader limitation already documented in CI. Independently compiling/running the production cache/update/Windows-maintenance modules and their tests passed 22 tests; this does not establish a full Desktop-host run.

Real interactive UAC, full macOS/Linux Desktop installation/upgrades, and remote workspace/control/Peer/Detached Dispatch scenarios were not exercised. No UI screenshots were captured.

Checklist

  • Focused maintenance changes; no binaries, secrets, temporary prompts or scratch artifacts included.
  • Verification outcomes and limitations recorded.
  • User-facing strings, docs and locales updated where applicable.

@kev1n77
kev1n77 merged commit 05d423d into openBitFun:main Nov 16, 2026
14 checks passed
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