Phase 7 follow-up: 1-month body retention and actions_log cap (AUD-75)
Implements the AGENTS.md §7 data rule: keep message bodies for one month, and size-cap the append-only action log. - internal/store/retention.go: Store.Retain clears messages.body_text older than the window (metadata stays) and deletes actions_log rows beyond the newest N, in one transaction. - internal/config: EMAIL_AGENT_RETENTION_DAYS (30) and EMAIL_AGENT_ACTIONS_LOG_MAX_ROWS (50000). - cmd/email-agent: bounded -retain flag for the n8n schedule. - Tests for body clearing, metadata retention, log cap, and disabled policy. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -65,3 +65,9 @@ APPRISE_KEY=
|
||||
APPRISE_URLS=
|
||||
APPRISE_TOKEN=
|
||||
EMAIL_AGENT_SUMMARY_TO=samuelrolfe@gmail.com
|
||||
|
||||
# --- Retention (AGENTS.md §7) -----------------------------------------------
|
||||
# `email-agent -retain` clears message bodies older than RETENTION_DAYS
|
||||
# (metadata stays) and caps the append-only actions_log at MAX_ROWS.
|
||||
EMAIL_AGENT_RETENTION_DAYS=30
|
||||
EMAIL_AGENT_ACTIONS_LOG_MAX_ROWS=50000
|
||||
|
||||
Reference in New Issue
Block a user