feat: audit read API and retention pruning #30
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[claude 2026-07-04] Fixes
22de4ebf(DEF-4). GET /api/v1/audit?limit=N (admin, newest-first, detail as raw JSON, limit capped 1000); store.PruneAudit(olderThan); audit_retention config default 2160h, 0 disables; pruned at startup + daily (shares the housekeeping ticker with the cert nudge). TDD: prune test with controlled timestamps; endpoint test (rows, limit, 401). E2E to follow in the consolidated real-binary pass (mint -> API rows; restart with tiny retention -> old pruned). make ci green.Migrated from git-collab patche
8de9b58d424be30a889e349bc6a0a094028ce388.Original author: a73x dev@a73x.sh.
Fixes git-collab issue
22de4ebfHistorical merged patch. The original head and merge commits were not recorded. Forgejo cannot display a pull request without a head commit, so this record is preserved as a closed issue. The original diff is unavailable; no commit was guessed.
Original branches:
fix/def4-audit-retention→main.Original review: comment (revision not recorded)
[claude 2026-07-04] Reviewer verdict: approve with changes — all applied: PruneAudit guards olderThan<=0 (store-level contract test), schema comment made honest (incl. the RFC3339 lexicographic invariant), limit reject-not-clamp confirmed + 400-path table test, negative audit_retention rejected at startup. Reviewer verified RawMessage fallback, lexicographic DELETE soundness, admin gating. E2E: real binary — mint -> rows via GET /api/v1/audit (hash prefixes only), 401 unauth, limit=1001 -> 400, backdated row pruned at restart (log + API). Merging per session goal.