You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 16, 2026. It is now read-only.
Summary
The schema is missing performance indexes for cleanup queries and has no data retention or partitioning strategy for the audit_events table.
Current state
db/migrations/0001_init.sql— single migration with all tablessessionsindexed on(tenant_id, run_id)but not onexpires_atgrantsnot indexed onexpires_atapprovalsnot indexed oncreated_atorexpires_atartifactsnot indexed onexpires_atorcreated_ataudit_eventshas no partitioning — will grow unboundedRequired work
expires_atfor: sessions, grants, approvals, artifacts (cleanup worker performance)audit_events.created_atfor time-range queriesgrants.session_idfor cascade lookups on session revocationLIMITtoListGrantsBySession(currently unbounded)Files
db/migrations/— new migration fileinternal/store/postgres/repository.go— cursor-based pagination for cleanup queriesinternal/worker/runner.go— use new cursorsPriority
Medium — performance degrades as tables grow.
🤖 Generated with Claude Code