35f611cd7e44b9d6d4c140839120f809cb7c389f
A second implementation of session-storage reclamation was drafted uncommitted on the control root's dev checkout (SessionDataArchive). This folds its distinct ideas into the committed implementation, which stays the base (per-directory locking, partial-then-rename with the directory-wins invariant, funnel-covered transparent restore, tests): - deleteSession is now truly permanent: it removes sessions/<id>/, the compressed <id>.tar.gz if the sweep packed it, and any local Carbon-mirror copy — previously every deleted chat leaked its transcript directory forever. Project deletion purges the same per chat; deleteEphemeralSession drops its now-redundant own removal. - The worktree-cleanup and storage sweeps source candidates from database.loadAllSessions() instead of persistedSessionRecords, which only holds active projects' sessions — an archived project's chats could otherwise never be reclaimed (a permanent worktree leak). - New opt-in retention policy (Settings ▸ Chats ▸ "Reclaim archived chat data", Never by default): an archived, non-favorite chat past the window is deleted outright on an Optimized-storage Mac, but on an All-Copies Mac it is compressed in place through the same guarded compression path — full storage never deletes. Off by default because discarding chat data must be an explicit opt-in. - The archiver verifies the fresh archive is listable (tar -tzf) before the source directory is removed, so a truncated stream is caught at compress time, not restore time. Co-Authored-By: Claude Fable 5 <[email protected]>
Description
No description provided
38 MiB
Languages
Swift
83.6%
HTML
4.7%
Python
4.5%
Shell
1.9%
C#
1.9%
Other
3.2%