Skip to content

feat(save): max-size-mb LRU prune — break the fat-blob ratchet - #2

Merged
emooreatx merged 1 commit into
mainfrom
feat-save-lru-prune
Jul 24, 2026
Merged

feat(save): max-size-mb LRU prune — break the fat-blob ratchet#2
emooreatx merged 1 commit into
mainfrom
feat-save-lru-prune

Conversation

@emooreatx

Copy link
Copy Markdown
Contributor

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

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
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@emooreatx
emooreatx merged commit ff52ca3 into main Jul 24, 2026
3 checks passed
@emooreatx
emooreatx deleted the feat-save-lru-prune branch July 24, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant