Repository navigation
fix(runs): old runs go, and the newest runs of each flow stay - #268
Merged
Merged
Conversation
The cleanup job removes the history of runs past retention (PD 54): every run of the window stays (max of 180 days and twice the longest day range of a view), and the newest runsToKeepPerFlow (default 20) of each flow stay. A run that did not end, a run whose events have not reached its Host, and a run that holds the last event of a walker stay too. Everything else goes with its rows, walk files, transcripts and logs, and so do the files of runs that are gone. Each place sweeps its own history, a minute after the start and every 6 hours. Red -> green (sweep-run-history.test.ts, retention.test.ts): - old run beyond the newest N: kept everything -> removed with rows and files - old run within the newest N: kept -> kept - young run: kept -> kept - unfinished old run (working, sleeping, at a Gate): kept -> kept, failed one goes - orphan files: kept -> removed after a day of rest - window follows the view ranges: Infinity -> max(180, 2 x longest) - the setting changes N: kept everything -> 20 keeps 4, 1 keeps 1 Closes #238 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: sander boer <mail@sanderboer.nl>
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.
Summary
Changes
Test plan
Related