Resolve iCloud conflict versions before reads (last-writer-wins)

Ports QuickRabbit's resolveConflictsIfAny (R4.3) into the eviction-safe read
path: before every coordinated read, pick the NSFileVersion with the latest
modification date, promote it to the canonical file inside a coordinated
write, mark all conflicts resolved, and prune the losers. Without this,
conflict siblings from two-device edits (workout logs edited mid-session are
the risky case) accumulate silently and a read returns whichever version the
filesystem hands back.

Claude-Session: https://claude.ai/code/session_01SY5jsAUf4qoPxSvv8xAqXS
This commit is contained in:
2026-07-04 10:04:46 -04:00
parent 22ea502d2c
commit 61ab9359ee
2 changed files with 54 additions and 4 deletions
+2
View File
@@ -2,6 +2,8 @@
Fixed workouts and splits vanishing from the app when iPhone storage ran low: when iOS offloads their files to iCloud to free up space, Workouts now downloads them back automatically instead of treating them as gone.
When the same workout or split is edited on two devices around the same time, all devices now settle on the most recent change instead of some keeping an older version.
**June 2026**
Starting a new workout while another is still going now asks whether to end the current one first or run both in parallel.