Fix silent data loss from bare except in store _load() methods#67
Merged
Conversation
PermissionError (data exists, can't read) now re-raises instead of caching an empty dict. Corrupt JSON still falls back to empty with logging. Docker entrypoint checks storage is writable at startup with a clear remediation message for pre-rootless volumes. Signed-off-by: Jason Madigan <[email protected]>
Signed-off-by: Jason Madigan <[email protected]>
jasonmadigan
marked this pull request as ready for review
June 4, 2026 22:00
shanetinklenberg
pushed a commit
to shanetinklenberg/tracefinity
that referenced
this pull request
Jun 28, 2026
…finity#67) * Fix silent data loss from bare except in store _load() methods (tracefinity#66) PermissionError (data exists, can't read) now re-raises instead of caching an empty dict. Corrupt JSON still falls back to empty with logging. Docker entrypoint checks storage is writable at startup with a clear remediation message for pre-rootless volumes. Signed-off-by: Jason Madigan <[email protected]> * Widen PermissionError to OSError, fix test gaps Signed-off-by: Jason Madigan <[email protected]> --------- Signed-off-by: Jason Madigan <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a production incident where rootless container deployment (PR #50) against existing root-owned volumes caused all stores to silently cache empty dicts. API returned 200 with empty data, no errors in logs.
Closes #66
Changes
except Exceptionsplit intoexcept OSError(re-raises -- data exists but unreadable) andexcept Exception(logs + empty dict -- corrupt/invalid data). Prevents cache poisoning on permission or filesystem errors.Test evidence
test_store_load_errors.pycovering all 4 active stores