Remove temporary-exception entitlement rejected by App Store#578
Conversation
Apple rejected Guideline 2.4.5(i): the temporary-exception entitlement com.apple.security.temporary-exception.files.home-relative-path is not permitted for Mac App Store apps. The exception is unnecessary because the macOS sandbox remaps HOME to ~/Library/Containers/<bundle-id>/Data/, so all UserProfile-based paths (~/.polypilot/, ~/.copilot/) resolve inside the container automatically. The copilot helper process inherits the sandbox via Entitlements.Helper.plist and sees the same remapped HOME. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔍 Multi-Model Code Review — PR #578 (Re-review + Fix)Remove temporary-exception entitlement rejected by App Store CI StatusPrevious Review Findings — Final Status
Fixes Applied (commit
|
When a user upgrades from a sideloaded (non-sandboxed) build to the App Store (sandboxed) build, their data at the real ~/.polypilot/ and ~/.copilot/ becomes invisible because the sandbox remaps HOME to the container directory. This adds a one-time migration in Program.cs that: - Detects the sandbox by checking for /Library/Containers/ in HOME - Derives the real home path from the container path - Copies .polypilot/ and .copilot/ data into the container - Uses a .sandbox-migrated marker to prevent repeated attempts - Skips gracefully if the sandbox blocks access (best-effort) - Never overwrites existing container data (don't-clobber invariant) Also fixes stale comments in ConnectionSettings.cs that incorrectly stated Mac Catalyst runs without app sandbox. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Only write .sandbox-migrated marker when files were actually copied and no errors occurred; prevents permanently sealing failed migrations - Track copy errors via ref bool hadErrors; migratedAny replaced with copiedFiles counter for accurate success tracking - Skip symlinked directories in CopyDirectoryRecursive to prevent uncatchable StackOverflowException from circular symlinks - Add depth limit (32) as additional recursion guard - Update xmldoc to reflect new marker-only-on-success behavior - Add trailing newline at EOF Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Problem
Apple rejected the Mac App Store submission under Guideline 2.4.5(i) - Performance:
Temporary exception entitlements are not approved for new Mac App Store submissions.
Fix
Removed the
com.apple.security.temporary-exception.files.home-relative-path.read-writeentitlement fromEntitlements.AppStore.plist.This entitlement was unnecessary because:
HOMEto~/Library/Containers/<bundle-id>/Data/UserProfile-based paths (~/.polypilot/,~/.copilot/) resolve inside the container automaticallyEntitlements.Helper.plist) and sees the same remappedHOMETesting