Skip to content

Add retention policies + cleanup jobs for auth_nonces, DLQ, processed events #161

@robertocarlous

Description

@robertocarlous

Problem

Tables like auth_nonces, processed_events, dead_letter_events, and agent_logs can grow without bound. This degrades performance and increases costs.

Acceptance criteria

  • Add scheduled cleanup jobs:
    • delete expired auth_nonces
    • archive or prune old processed_events (configurable retention)
    • retention strategy for agent_logs (configurable)
  • Add indexes where required for cleanup queries
  • Add metrics: rows deleted, job duration, last successful run
  • Document retention defaults and how to override via env

model AuthNonce { ... expiresAt ... }

Priority

P1 / High

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions