seek gc gains a --sort flag and hardened table rendering. seek gc --dry-run --sort=size shows what is eating your disk.
Upgrade. No re-index, no cache-layout change, no removed flags. Automatic cache GC is unchanged — sorting is manual-only.
What changes for you
- Sortable GC table.
seek gc --sort=name|age|size:name(default, hash order),age(oldest.usedfirst — the eviction order),size(largest first). Invalid--sortexits non-zero (was a silent no-op); shell completion lists the values. - Disk audit in one command.
seek gc --dry-run --sort=sizeprints the plan by size, mutates nothing. Add--forceto skip the daily throttle,--allto evict every corpus not in use. - Terabyte sizes. The SIZE column now renders TB caches (was GB-capped), still within its 6-char width.
- Sane ages under clock skew. A future
.used(NTP step,cp -prestore) renders0s, not a negative raw-second blob. - Safe table cells. Control characters and tabs are stripped from displayed paths; left-truncation lands on rune boundaries, so multibyte paths never render orphan continuation bytes.
- Documented maintenance. New README "Cache maintenance" section: auto-GC (14d TTL, once per day, off on NFS), the
SEEK_GC_MAX_AGE/SEEK_GC_INTERVALknobs, manual commands.
Dev/test
- Dry-run and live GC paths unified so the tables cannot drift: shared
gcTableStats,emitGCRow,predictGCAction/evictIfExpired,sweepCorpusOrphans,buildGCRows/sortGCRows.--sortvalues come from onegcSortValueslist feeding both the parse error and completion. - Sorted views (
age/size) measure all rows before rendering;nameand the silent opportunistic path stream incrementally, keeping Ctrl-C prefix semantics. releaseLockis now nil-safe, replacing hand-rolled unlock+close inrunGCandevictCorpus.- Coverage:
gc_sort_test.go(sort keys, tiebreaks, cancel),gc_format_test.go(TB, sanitize, rune boundaries, negative duration), a guard that the empty-cache live run still stamps.last-gc, andBenchmarkGC_RunGC_StreamingSorted_N100. TODO(gc-size-cap): futureSEEK_GC_MAX_TOTAL_SIZE(journalctl --vacuum-sizestyle, LRU-by-age).
Full changelog: v0.13.2...v0.14.0