Repository navigation
Conversation
…over 13 stores Replace lru_cap / lru_cap_bun / lru_cap_mise_installs with a single lru_entries engine driven by STORE_TABLE (bun npm pnpm gradle cargo rustup konan mise-data mise-cache hk pub toolcache + the action archive cache). Whole directories are evicted where partial entries are unusable (bun packages, gradle versions, toolchains, tool versions), files elsewhere, with global LRU across a slot's stores and a budget of min(CACHE_BUDGET_BYTES, CACHE_BUDGET_PCT% of the fs) per slot. Slots under $RUNNER_DATA_DIR/slots are pruned under .prune.lock and skipped while a fresh busy marker exists. The loop checks df every PRUNE_CHECK_SECONDS and prunes fully when free space is low or the interval elapsed, with a tighter docker prune under pressure. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
pnpm's store lives in cache/pnpm/store and its metadata cache in cache/pnpm/cache (both symlink targets). Evict them together, emptying the directory but keeping store/ and cache/ so the container symlinks stay valid. Also test that control slots without a cache/ dir are skipped. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Author
|
folded into the combined refactor PR |
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.
Summary
Rewrites the cache-capping half of
pruner.sharound one genericlru_entriesengine driven by aSTORE_TABLE.prefetch_*and docker prune behaviour are unchanged, apart from a tighteruntil=under disk pressure.lru_cap,lru_cap_bun,lru_cap_mise_installs)lru_entries) + per-store hooksmin(CACHE_BUDGET_BYTES=60 GiB, CACHE_BUDGET_PCT=40 % of fs) / slots, one global LRU across the slot's stores<g>/<m>/<v>, transforms, wrapper dists, jars dirs; metadata untouchedflock -n .prune.lock; slot skipped whilebusy< 6 h old, stalebusyprunedPRUNE_CHECK_SECONDS(3600); full pass when free <PRUNE_FREE_PCT(15) orPRUNE_INTERVAL_SECONDSelapsed; docker pruneuntil=2hinstead of 24h under pressureProtected: bun
bin/and@t@piles, cargobin/and registry index, rustup default toolchain (fromsettings.toml, short names match<name>-<triple>). Toolcache<ver>is removed with its<arch>.completemarkers (markers first).CACHE_CAP_BYTESstays as a deprecated alias ofCACHE_BUDGET_BYTES(now a total over slots, logged).Depends on W3
Needs the compose side from W3 (contract C1):
RUNNER_DATA_DIRmounted at the same path into the pruner service and passed as env, with slots at$RUNNER_DATA_DIR/slots/<id>/{cache/<store>,busy,.prune.lock}. Without it the pruner finds no slots and only trims the action archive cache. Merge together with, or right after, W3's PR.docker-compose.yml, hooks, README and workflows are untouched here.Tests
docker run --rm -v "$PWD:/w" -w /w ubuntu:24.04 bash tests/<t>.sh— all pass, plusshellcheck -x pruner.sh tests/*.shclean:pruner-bun(ported to the slot layout),-gradle,-cargo,-pnpm,-rustup,-toolcache,-busy(fresh/stale/locked),-budget(split over 2 slots); shared helpers intests/lib.sh.Not verified against a real runner volume.
🤖 Generated with Claude Code