-
fix: codex pass-2 hardening + bump to 2.5.2 (build 11)
发布于
2026-05-24 05:53:43 +00:00 Three issues caught by the second codex review pass:
-
PermissionCoordinator.handleGrant scheduled the post-grant retry via
DispatchQueue.main.asyncAfter with no cancellation. A user who tapped
"Skip for now" during the 1-second success-display window would still
see the retry execute, contradicting their explicit dismiss. Fixed by
storing the deferred work as a DispatchWorkItem on the coordinator
and cancelling it from dismiss(). Also cancels if handleGrant fires
twice in rapid succession (immediate-read + first poll tick). -
AppFilesView retry rebuilt its CleanableItem batch from
appState.selectedFilesat .onChange fire time. If the user clicked
a different app in the sidebar or mutated the selection while the
FDA sheet was open, the retry could trash the wrong files. Fixed by
addingAppState.lastFailedRemovalURLspopulated in finishRemoval
with the exact failed batch; AppFilesView now consumes that frozen
snapshot instead of the live selection. -
FullDiskAccessManager.triggerRegistration probed 10 paths including
Messages, AddressBook, Calendars, and MobileSync — none of which are
gated by SystemPolicyAllFiles (FDA). Touching them registered PureMac
in unrelated TCC services ("Messages", "Contacts", etc.) and would
surface confusing privacy prompts. Scoped down to 7 FDA-only paths:
TCC.db, Mail, Safari (CloudTabs + Bookmarks), Cookies, HTTPStorages,
~/Library/Application Support/com.apple.TCC.
下载附件
-