fix: parked-tier loader joins the corrupt-cache quarantine - #604
Merged
Conversation
load_parked_body folded every failure into a silent None, so a corruption-class failure on the parked path (the bloom section is exactly where 'k_hashes out of range' surfaces) left the poisoned file in place. The read/decrypt/decompress pipeline now returns the structured LoadCacheError, and load_parked_body quarantines the file on corruption — same contract and same quarantine helper as load_compact_cache — while transient failures (IO, key unavailable) still just debug-log and return None.
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.
Follow-up to #603, closing its one deliberate leftover:
load_parked_body(the Parked-tier bloom + trie sidecar loader) folded every failure into a silentNone, so a corruption-class failure on the parked path — the bloom section is exactly wherek_hashes out of rangesurfaces — left the poisoned file in place until the full-body loader happened to touch it.The read/decrypt/decompress pipeline (
read_decompressed_plaintext) now returns the structuredLoadCacheErrorinstead ofOption, andload_parked_bodyapplies the same contract asload_compact_cache: corruption-class failures (decrypt / decompress / parse) quarantine the file as<name>.corruptvia the shared helper, while transient failures (IO, key unavailable) debug-log and returnNoneuntouched. Parse failures fromdeserialize_parked_bodyare wrapped asLoadCacheError::ParseErrorand quarantined too.Tests: missing file classifies as transient
Io(no quarantine); garbage bytes classify as corruption (keystore-less hosts early-out onKeyUnavailable); the pipeline itself never touches the file — quarantine stays the caller's decision.Validation:
just gogreen (911 uffs-core tests incl. 2 new),just check-windowsgreen, pre-push gate green.