pub fn wipe(root: &Path) -> Result<()>Expand description
Wipe every trace of collection, leaving a permanent tombstone.
Order matters and is the whole of the guarantee:
- take the blocking lock — this is not an exit path;
- write the tombstone first, and never remove it here;
- truncate
buffer.jsonlanddryrun.jsonl— do not unlink them, and never unlink the lock file; - remove
install_id.jsonandstate.json.
If any step after the tombstone fails, the error is returned and the caller logs it — but the tombstone alone already makes the buffer permanently undrainable, so a failed wipe fails closed.