[pr-fix][shaders] Shader cache prune: staging files a stopped run left go by their age too #377
Loading…
Reference in a new issue
No description provided.
Delete branch "iboom72/cache-prune-staging"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What it changes
Cache::prune(crates/darner-pipeline/src/cache.rs:188-189) keeps every.tmp-*file (old = !staging && …). So a staging file left by a run that stopped between writing and renaming stays in the shader cache for good. This only matters withDARNER_SHADER_CACHE_DAYSset, because pruning is opt-in.Staging files now go by the same age rule as entries. The shortest
max_agein use is a day (DARNER_SHADER_CACHE_DAYS=1;0turns pruning off), and a write takes far less, so a staging file still being written, by this run or a preload child, is never that old.It doesn't change the shader cache key: darner-pipeline is not part of
DARNER_TRANSLATOR.How it was tested
9e1d37bf(onmainf3840d73)cargo test -p darner-pipeline --locked: 15 passed.prune_removes_old_entries_only_once_hits_are_markednow also has an old staging file removed and a fresh one kept.cargo clippy -p darner-pipeline --all-targets --locked -- -D warnings: clean.Checklist
main.docs/asset-policy.md.Checked for overlap
mark_prunedafter the same loop) and #253 (copy-free keys, same file). Each merges with this branch without a conflict (git merge-treeagainst their heads).Checked with AI assistance (Claude Code).
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.