Write the digests the deleter already knew how to drop #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/digests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
digeststable had a deleter and no writer since the first migration: a promise with only its failure mode built.What changes. The retention sweep writes a day digest for every closed day without one, before it expires anything, so the counts are taken while the records exist: events by signal and verdict, frames stored and their bytes, sessions, apps, first and last record. Counts, never identifiers, so it is plaintext like the index. A session digest is written when a session ends. A read API returns them newest first.
Two deletions, two answers. A record leaving on the retention timer left the device, not the world, and a digest of counts is meant to outlive it. That is how a year stays answerable once the frames are gone. A record a person erased still drops the digest that counted it, as it always did. The deletion path already knew which case it was in because it already knew whether to tell the server; the digest rule reads the same flag. Day digests are kept 365 days, the longest local window, then pruned.
Proof. Store: a closed day gets one digest with the right counts and an open day none; a second sweep writes nothing; expiry keeps a digest and erasure drops it; a session digest at session end. Gate: the day's digest counts both old frames although one expires in the same sweep, which fails with the order swapped, checked by swapping it. Linux verifier green on the pinned toolchain. Not run here: the Windows verifier and the end-to-end suite.