Skip to content

Add GDPR-friendly retention cleanup (#37) - #43

Merged
ncoevoet merged 1 commit into
masterfrom
issue-37-gdpr-retention
May 20, 2026
Merged

Add GDPR-friendly retention cleanup (#37)#43
ncoevoet merged 1 commit into
masterfrom
issue-37-gdpr-retention

Conversation

@ncoevoet

Copy link
Copy Markdown
Owner

Adds a per-channel banRetention setting and a daily _retentionCleanup that 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.

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.
@ncoevoet
ncoevoet merged commit 233b25a into master May 20, 2026
@ncoevoet
ncoevoet deleted the issue-37-gdpr-retention branch May 20, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement GPRD friendly retention cleanup

2 participants