fix(script): keep Defi bundle name during install transaction

Merged
QE
8d ago
+11-7

Problem

Source installs (script/build_and_run.sh) moved the installed bundle to .Defi-install.XXXX/previous.app before replacing it. LaunchServices follows moved bundles, so System Settings could list Defi's Accessibility and Screen Recording entries as previous, permanently so when a failed install retained its recovery bundle.

Fix

Keep the Defi.app file name for both transaction bundles: previous/Defi.app and candidate/Defi.app. Bundle identifier and code signature are unchanged, so existing permissions stay valid.

Release installs (Homebrew, ZIP) are unaffected: packaging only uses --stage.

Verification

  • python3 script/verify.py local passed, including the failed-install recovery workflow test.
  • Desktop installation not run.

[!NOTE]

Keep Defi bundle name during install transaction

The installer previously staged bundles under generic names, which broke the .app naming during install. This change stages previous and candidate bundles at paths that include the application name and .app suffix.

  • Creates separate previous and candidate directories inside the transaction before install proceeds in build_and_run.sh
  • Rollback restores the previous bundle from the new filename-preserving path
  • Candidate copy, code-signature verification, and the replacement moves all use the new named paths
  • Risk: rollback detection now depends on the previous-bundle path in finish_install; check that path matches the new layout

Macroscope summarized 3d3c5ad.