Repository navigation
retention: every sweep reaches every record class and says what it did — card presses go with their events, the watcher keeps thirty days - #48
Merged
Conversation
…d — the pipe purges card presses with their events, the watcher keeps thirty days Asked of each sweep which records it never reaches: card_actions was the one pipe table no sweep touched. It has no foreign key to events, so the presses of purged events stayed forever while the purge's comment promised a bounded ledger. The purge now deletes a press once its event is gone and the press is older than the window; a press on an event kept for a queued promise stays. The investigator keeps case files forever by default, which is right for investigations and wrong for the watcher, whose case files are rounds: five weeks left 356 case files, 317 telemetry files and 36 audit days on its volume with nothing removing them. The work compose sets HOOKPROBE_RETENTION_DAYS to 30 on that node alone (WATCH_RETENTION_DAYS). The audit chain is verified over its last seven day files, so a swept day is never a break. The judge's purge logs its count like the pipe's, and the investigator's two sweeps count the files they could not remove or inspect and warn on every run instead of skipping them in silence. A second deployment running copies of these files found the shape this week: an upgrade began writing records its daily cleanup could not reach, and six hundred piled up unsaid.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A second deployment running copies of these files upgraded its runtime this week. The new version began closing orphaned sessions at startup under a new end reason, its daily cleanup matched only sessions that had never ended, and six hundred piled up over six days with nothing said. Asked of this repository, the same question had two answers.
The pipe's purge never reached card presses.
card_actionshas no foreign key toevents, so when the retention purge deleted an event its presses stayed, forever, while the purge's own comment promises a ledger that does not grow forever. The purge now deletes a press once its event is gone and the press is older than the window. A press on an event kept for a queued promise stays, and so does a young one. The test for the purge now plants a press on each of its three events and checks which survive.The watcher kept every round. The investigator keeps case files and transcripts forever by default, because an investigation is recall. The watcher's case files are rounds, one every twenty minutes of the working day, read back by the signer's settlement for at most an hour and grepped by the next round for the same subject. Measured on the stopped work stack's volume:
The work compose now sets
HOOKPROBE_RETENTION_DAYSto 30 on that node alone, throughWATCH_RETENTION_DAYS; 0 keeps everything. The planner and the work runner keep the default. The audit chain is verified over its last seven day files and its first line in the window may point outside it, so a swept day is never a break.Every sweep says what it did. The judge's hourly purge logs its count like the pipe's. The investigator's two sweeps count the files they could not remove or inspect and warn on every run, where they used to skip them in silence and read as healthy; a test makes the results directory read-only and requires the warning.
Not done, and why. A per-table row count on the console, and an integrity check of the ledgers after an abrupt host stop: the doctor script knows no ledger paths, and the deployment that measured such a stop found its ledger intact. The decision note records both.
Nothing is deployed; the work stack stays stopped. The pipe, judge and investigator changes ship at the next release.
Gate: STACK GATE GREEN locally; CI read back before merging.