check / check (push) Successful in 26s
Extends the content cache (#46) so cacheDirectory/originals stays within a size limit. Before each original write the effective limit is min(cacheOriginalsMaxBytes, bytesUsedByOriginals + bytesFree - freeBelowBytes), with bytesFree from fs.statfs on the cache volume: it falls as the disk fills and rises as space returns. status().originalsLimitBytes exposes it. A write that crosses the limit evicts least-recently-used originals until it fits; pinned originals are skipped, and when only pinned remain the write proceeds over-limit. Last-use is the file mtime, bumped on every read that returns a path, so order survives restarts with no ledger. Eviction runs just after the write, once the plaintext size is known on disk (the download layer cannot report it beforehand); the freeBelowBytes reserve absorbs the transient. Defaults: 100 GiB limit, 50 GiB reserve. The pinned predicate is a hook the precache unit (#48) will supply; only cacheDirectory/originals is touched — the backup download directory and thumbnails are never counted or evicted. Model: opus-4-8