Smaller hardening for the Free up space estimate and the Unix folder identity #244

Closed
opened 2026-10-27 14:01:36 -05:00 by ethan-hann · 1 comment
Owner

Lower-risk review findings left after the Free up space size estimate (#228, D66) and the Unix folder identity (#167, D57):

  • The estimate's git reads do not take the game's lock, so a long estimate might make Delete game fail on Windows while it holds a pack open (unverified, unlikely). Take the lock for reading, or cancel the estimate when a game is deleted.
  • No test covers data that only a detached HEAD reaches, or cancelling the estimate in the middle of its walk.
  • The cached figure stays stale after a repack that moves no ref; include the pack list (or its newest time) in the cache key.
  • On a FAT or exFAT game folder on Linux, the device and inode may not be stable across reads, so a destructive step could stop with "folder changed" with no swap. It fails safe; check what statx reports there and skip the identity when the file system does not keep inodes.
Lower-risk review findings left after the Free up space size estimate (#228, D66) and the Unix folder identity (#167, D57): - The estimate's git reads do not take the game's lock, so a long estimate might make Delete game fail on Windows while it holds a pack open (unverified, unlikely). Take the lock for reading, or cancel the estimate when a game is deleted. - No test covers data that only a detached HEAD reaches, or cancelling the estimate in the middle of its walk. - The cached figure stays stale after a repack that moves no ref; include the pack list (or its newest time) in the cache key. - On a FAT or exFAT game folder on Linux, the device and inode may not be stable across reads, so a destructive step could stop with "folder changed" with no swap. It fails safe; check what statx reports there and skip the identity when the file system does not keep inodes.
ethan-hann added this to the Later milestone 2026-10-27 14:01:36 -05:00
Author
Owner

Shipped in SavePoint 0.9.22 (PR #274). FAT32 and exFAT on Linux skip the folder identity (D57.6); this still needs a hand check on a real drive, now in docs/testing-on-mac-and-linux.md.

Shipped in [SavePoint 0.9.22](https://git.tortal.tech/ethan-hann/SavePoint/releases/tag/v0.9.22) (PR #274). FAT32 and exFAT on Linux skip the folder identity (D57.6); this still needs a hand check on a real drive, now in docs/testing-on-mac-and-linux.md.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ethan-hann/SavePoint#244
No description provided.