Repository navigation
Conversation
mcagnion
force-pushed
the
bugfix/timeless-jewel-cache-integrity
branch
from
August 29, 2026 07:29
f83a40a to
2d37d6b
Compare
Reject empty cached and inflated payloads so headless stubs cannot create zero-byte caches. Write replacements through a checked temporary file and restore an existing cache when promotion fails.
mcagnion
force-pushed
the
bugfix/timeless-jewel-cache-integrity
branch
from
August 29, 2026 08:21
2d37d6b to
36b52f7
Compare
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.
Description of the problem being solved:
Running PoB headless from a source checkout (the test suite, or a script using
HeadlessWrapper.lua) leaves empty Timeless Jewel cache files behind. HeadlessInflate()returns an empty string, andDataJewelFileLoaderwrites that result tosrc/Data/TimelessJewelData/<jewel>.bin. The empty file is newer than the.zip, so when the desktop app later starts from the same checkout it takes that file as up to date and loads empty jewel data, until the.binis deleted or the archive changes.With this PR the loader:
Inflate()returns nothing (the loader returns nil);A failed cache write is not fatal: the current load still uses the data it just inflated.
Headless decompression itself is not implemented here (#9748 covers that): headless runs still get no Timeless Jewel data, but they no longer break the cache used by the desktop app.
Steps taken to verify a working solution:
Inflate()result opens no cache file for writing.