feat(save): max-size-mb LRU prune — break the fat-blob ratchet - #2
Merged
Conversation
restore(fat) → build → save(fat+): stale artifact generations (e.g. an entire superseded dep-version set after a re-pin) are restored, never rebuilt, re-saved forever — the blob only grows, and every lane pays download+extract on every run (observed 240-400s ciriscache steps in CIRISPersist CI; ~145s download + ~196s extract of a multi-GB blob). Native bash LRU by mtime under target/ until within budget, BEFORE tar: zero install cost, GNU-find-guarded (Linux lanes — where the pain is), fail-open elsewhere. Reused-but-ancient artifacts may take ONE forced recompile then re-enter fresh — mild steady-state churn for a bounded blob. Never touches ~/.cargo (lockfile-keyed, not generational). Verified locally: staggered-mtime corpus 10.2MB→4.1MB, oldest evicted. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UV9Rrc8ktu9ZZ2MsxXaxZb
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Save-side LRU prune under target/ (oldest mtime first) until within the max-size-mb budget, before tar. Breaks the restore(fat)→save(fat+) ratchet observed in CIRISPersist CI (240–400s cache steps; the blob accretes superseded dep generations forever). Native bash, GNU-find-guarded to Linux lanes, fail-open elsewhere; ~/.cargo untouched. Locally verified on a staggered-mtime corpus (10.2MB→4.1MB, oldest evicted, newest kept).
🤖 Generated with Claude Code