Files
farmioandClaude Opus 5 88e8f04349 Fix compressed Store lookups and corrupt file handling
The store manager caches by filename, so a compressed store asking for
"key.zst" was told the file does not exist whenever only the uncompressed
predecessor was on disk. That short-circuited the load before the fallback
in _load_data_from_disk could run, so enabling compress on an existing
store read as empty on any real start, where the manager is initialized.
Only report "does not exist" when neither filename is on disk.

Rename the file that actually failed to parse when handling corruption.
The compressed path was renamed unconditionally, which raised
FileNotFoundError out of the executor when the uncompressed fallback was
the corrupt one, and named the wrong file in the repair issue.

Preload compressed stores too. Callers only know the plain key, so look
for both spellings before intersecting with the files on disk.

Also invalidate both filenames when writing or removing, since both drop
the uncompressed predecessor, and use a sentinel to tell "no file" apart
from a file holding an empty dict.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-23 08:01:22 +02:00
..