Repository navigation
fix(worker): cap LHM cache recovery with a prior receipt hash - #130
Merged
Merged
Conversation
austinjiann
changed the base branch from
codex/cache-archive-metadata
to
main
November 21, 2026 04:17
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.
A deadline during the first LHM range recovery leaves useful partial files but no supported final recovery path. Add an explicit, hash-bound final slot that accepts only the exact failed deadline receipt and eligible incomplete cache. Preserve both earlier receipts, record prior/current call IDs and attempt 3 overall / range attempt 2, and refuse every replay of the fixed final slot. Ordinary recovery behavior remains unchanged.
The operator must verify the prior app is terminal and persist an exclusive local launch claim; the Modal volume alone is not a cross-launcher atomic lock. No automatic retry or arbitrary attempt naming is introduced.
Validation: 90 offline tests on Python 3.11 and 54 focused tests on Python 3.12; CLI parsing, Ruff, format checks and diff checks passed. Tests cover receipt/hash/state rejection, retained history, ownership persisted before ranges, Git-payload exclusion and final-slot replay refusal. Live validation completed in austinjian07: the final slot reused 65 entries, extracted 33 runtime entries and fetched 2,175,449,183 range bytes. It validated 70 runtime files plus the pinned LHM snapshot and detector checkpoint. Both earlier receipt files remained byte-identical, and the owned app stopped. This establishes cache staging, not GPU inference or scene quality. Stacked on #129.