Repository navigation
fix(freshness): move an unreadable history file aside - #484
Open
MoonBoi9001 wants to merge 6 commits into
Open
MoonBoi9001 wants to merge 6 commits into
MoonBoi9001 wants to merge 6 commits into
Conversation
When IISA can't read or parse its saved freshness file it starts with no history, and its next save replaced the file, so a disk fault or a release that misreads it lost up to 28 days. It now renames the file aside with the time in its name and logs an error.
…andom-selection' into mb9/keep-unreadable-freshness-file-instead-of-overwriting
A file moved aside was named by the second, so a 2nd unreadable file in the same second, such as a restored copy read straight after the original, replaced the 1st. Names now add a random part.
The error said the next save replaces such a file, but a save can fail too, for example where the file is a folder, so it now says may. The loading notes say the move happens if it can.
The reason a file couldn't be read already carried its path, so the error line named it twice. It now gives only the reason.
The test for a file that can't be read only checked that something was moved aside. It now checks exactly 1 file moved, nothing left at the old name, and an error logged.
MoonBoi9001
marked this pull request as ready for review
November 20, 2026 11:44
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.
When IISA can't read or parse its saved freshness file at startup, it now renames the file aside with the time in its name and logs an error. Before, it started with no history and its next save, a minute later, replaced the file, so a disk fault or a release that misreads the file lost up to 28 days of freshness history for good.