pingqiuandClaude Opus 5.5 ea0b8955dc storage: cap the cut COW spill file; a save past the cap aborts the cut (#216 follow-up P3)
Past the 64 MiB in-memory budget a copy window spills saved chunks to a
sparse side file next to the volume, with no byte limit: under a long copy
and steady writes it could fill the filesystem under the WAL/extent.

New chunkLayerConfig.COWSpillLimit (bytes; 0 defaults to 1 GiB, negative
refused at attach). A save that would take the side file past it aborts the
window (errCutCOWAborted, the caller retries the cut) instead of writing;
the guest write still completes.

Tests: a save past the cap aborts the cut, the write completes and no side
file is written; a spill within the cap is accounted (one chunk) and the cut
completes; the default applies and a negative cap is refused. Four declared
mutants (no cap, no accounting, no default, negative accepted) each turn
exactly their declared tests red.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 20:39:50 -08:00
Languages
Go 84.5%
Rust 7.9%
Shell 2.7%
templ 1.6%
Java 1%
Other 2%