Skip to main content

Module history

Module history 

Source
Expand description

The per-pass prune log: what each pass deleted, and what asked it to.

The registry already counted passes — four integers each, capped at fifty — which answers “how much has this saved me” and nothing else. It could not answer “what did the pass on the 12th actually delete”, because the only full directory list it keeps is last_prune, and the next pass overwrites it. This file is that missing half.

It is a separate file rather than another field on the registry because the two are read on opposite schedules. registry.json is parsed by every command and rewritten in full on every save; a growing per-directory record inside it would be a cost paid by devp status. This one is opened by devp history and appended to by a pass.

Nothing here is load-bearing. A pass that cannot write its log entry still deleted the directories and still updated the registry, and devp restore --last-run reads the registry, not this. Every write is best-effort and every read tolerates a torn line: a pass killed between the write_all and the sync_all must cost one log entry, not the command that reads it.

Structs§

PassRecord
One prune pass, in full.

Enums§

Pass
One pass as devp history sees it, from whichever source knows about it.
Trigger
What started a prune pass.

Functions§

append_to
record, against an explicit path. The testable half.
load
Every recorded pass, oldest first.
load_from
load, against an explicit path.
log_path
Full path to the prune log.
merged
Every pass this machine can account for, newest first.
record
Record a pass, superseding this same pass’s earlier entry.