pub fn compact_closed_ledger_chunks(repo_root: &Path) -> Result<usize>Expand description
Compacts ledger-journal.jsonl and removes closed-chunk .ctbnode-incoming (and legacy .dcsh)
files from src/formats/dcdata/data-src/nodes/allocated/ for all .ctbnodes chunk files that
have reached MAX_NODES_PER_CHUNK (100 nodes) and are therefore closed.
Any Manual provenance items (provenance == "manual") in closed chunks are retained inside the
compacted bootstrap_checkpoint record’s items list (with inbox_name, allocated_name, and
inbox_sha256 cleared) so Manual node ownership is permanently preserved across compactions.