Skip to content

feat(bff): retention sweep for the app-tier audit trail (erweb.audit) #897

Not planned

Description

@athvin

Deferred from #885 (E4 #519). The dispatcher now purges er-server's audit_log and settled webhook_deliveries past ER_AUDIT_RETENTION_DAYS (floor 400 days), but the APP-TIER trail — erweb.audit (drizzle, four indexes, no TTL), the one holding logins and impersonation — has no sweep; its retention is only the infra D-RETENTION decision as prose. The BFF has no daemon, so the mechanism needs choosing (a sweep on an authenticated admin request path with a last-run row, a pg_cron-style scheduled statement on Aurora, or a dispatcher-side cross-schema delete). D-RETENTION's amendment in this PR records the gap.

Done when: rows older than the window are retired on a schedule, the floor is clamped like pg::retention_days_from, and the purge is tested the way pg_audit.rs tests the er-server one.

Activity

  1. added
    javascript
    on Nov 8, 2026
  2. added
    needs-review
    pruned
    and removed
    needs-review
    on Nov 27, 2026
  3. athvin commented on Nov 27, 2026

    @athvin
    OwnerAuthor

    Closed in the second 2026-11-26 board prune. The board now targets only the API that customers use to build their own deduplication tooling. Everything else is bonus, and this card is one of those. It's labelled pruned and can be reopened later.

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

    javascriptpruned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions