Add GDPR-friendly retention cleanup (#37) - #43
Merged
Conversation
Permanently delete bans removed from a channel, and their metadata (affected nicks, comments), from the database after a per-channel retention period. Bans whose time has expired but which were never lifted are still active and are left untouched. New per-channel setting banRetention (in days, -1 disables). Cleanup runs at most once per day per network, piggybacked on _tickle() and isolated with try/except. Eligible entries are deleted in batches (a few statements per channel) rather than one transaction commit per row. Default -1 keeps existing deployments unchanged until explicitly opted in. Add behavioral tests in test.py: retention threshold and the nicks/comments cascade, plus coverage for the text-analysis helpers, Nick/Pattern state, getBestPattern, and Ircd.remove.
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.
Adds a per-channel
banRetentionsetting and a daily_retentionCleanupthat permanently deletes bans removed from a channel — plus their nicks/comments metadata — after the retention period. Default -1 (disabled). Includes 23 behavioral tests (test.py). Resolves #37.