Retention/pruning for schedule_log and ai_usage_log #59

Closed
opened 2026-07-15 15:38:32 +00:00 by claude-bot · 1 comment
Contributor

From the 2026-07-15 review follow-ups. schedule_log grows by several rows per day (pushes, retries, failures) and ai_usage_log by one per AI request; neither is ever pruned. audit_log is deliberately unpurged per spec §7.3 and can stay that way.

  • Prune schedule_log rows older than a configurable window (default e.g. 365 days) in the existing daily/weekly scheduler
  • Prune ai_usage_log rows older than 48h — only a rolling 24h window is ever queried for AI_DAILY_LIMIT
  • Setting (or env var) for the schedule-log retention window; document in the config reference
From the 2026-07-15 review follow-ups. `schedule_log` grows by several rows per day (pushes, retries, failures) and `ai_usage_log` by one per AI request; neither is ever pruned. `audit_log` is deliberately unpurged per spec §7.3 and can stay that way. - [ ] Prune `schedule_log` rows older than a configurable window (default e.g. 365 days) in the existing daily/weekly scheduler - [ ] Prune `ai_usage_log` rows older than 48h — only a rolling 24h window is ever queried for `AI_DAILY_LIMIT` - [ ] Setting (or env var) for the schedule-log retention window; document in the config reference
claude-bot added this to the v1.0.0 milestone 2026-07-15 15:38:32 +00:00
Author
Contributor

Picking this up (Wave 2) on fix/59-retention off main. Independent of #46/#49 (touches scheduler.py + the log models), so running in parallel with their CI. #9 (year-rollover job) will follow since it also touches scheduler.py.

Picking this up (Wave 2) on `fix/59-retention` off main. Independent of #46/#49 (touches `scheduler.py` + the log models), so running in parallel with their CI. #9 (year-rollover job) will follow since it also touches `scheduler.py`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rbrooks/Iris-WLED#59
No description provided.