Function prune_repo_cache
pub fn prune_repo_cache(repo_dir: &Path, max_entries: usize)Expand description
Remove .duckdb files from repo_dir beyond max_entries, deleting the
oldest (by mtime) first. Also sweeps stale .tmp.<pid> and
.tmp.<pid>.wal artifacts left behind by crashed runs.
Errors from individual file deletes are logged but not fatal — a partial prune is better than aborting the analysis.