Low-severity items left after the review of #153 (MR 489); neither puts plaintext on disk.
-
The restore of another app's version can overwrite a third version.
DocumentSession.closedFileSaver→restoreOverwrittencallsdisk.replace(url, with: theirs)without checking what is on disk at that moment. If a third write lands after our replace and before the restore (a window of microseconds), the restore overwrites it and it isn't kept in recovery. Fix: read the disk first and restore only when it still holds the bytes we wrote; otherwise leave the newer version and still fail. -
Hidden clock tasks can drop out of history. On a launch where the Keychain can't be read (for example an iOS launch before first unlock, when the watch wakes the app), the run hashes titles with a session key, so earlier hidden tasks without an ID can't be matched;
ClockHistory.pushdrops them and the next save makes it permanent. No text is exposed. Fix: when the key isn't available, keep history entries that have a stored hash unchanged instead of refreshing them away.
Platforms: Mac, iOS.
closed by cmc in commit 9300add1d8: Restore only over our own write; keep hidden clock tasks without the key
2026-11-26 11:38 UTC