Adds 1-year retention for audit log entries on the Business plan. Closes the compliance gap flagged in #3211 — the read-side already supports per-plan retention, this PR only persists it on writes.
retentionFor(plan) helperretention_days with sensible defaultsscripts/backfill-retention.tsexport function retentionFor(plan: Plan): number {− if (plan === 'business') return 365+ return RETENTION_BY_PLAN[plan] ?? DEFAULT_RETENTION}
Could we extract the retention map so the api route doesn't need to know about plan tiers? Otherwise this LGTM.
Resolved with the inline suggestion. Thanks!