Skip to content

Schedule audit retention cleanup (AUDIT_RETENTION_DAYS) #8

Closed

Description

@OkiriGabriel

Problem

Audit retention is documented and implemented, but the cleanup method is never executed on a schedule.

Current state

  • IncidentStore.apply_retention() in services/incident_store.py deletes old audit/log/checkpoint objects
  • Method is defined but never called from api/server.py, queue worker, or CLI
  • .env.example documents AUDIT_RETENTION_DAYS=90

Acceptance criteria

  • Run apply_retention() on a schedule (lifespan background task or queue worker interval)
  • Support multi-org via ORG_IDS
  • Add test in tests/test_services.py covering deletion of aged keys

Files

  • services/incident_store.py, api/server.py, services/incident_queue.py, .env.example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions