<#1074 Reduce database load from dashboard polling...
# osctrl
g
#1074 Reduce database load from dashboard polling and correct activity reporting Pull request opened by javuto Summary Reduce database load from polling and live event streams, and correct enrollment activity reporting. • Remove routine read audits while preserving mutation, download, and security events. • Add configurable audit retention, defaulting to 90 days, with bounded cleanup batches. • Count successful enrollments explicitly and classify query actions correctly. • Cache permissions per request and stream authorization pass while preserving revocation checks. • Safely remove redundant status/result UUID indexes without changing existing column types. Validation • Full Go test suite passed. • TypeScript checks and audit-page tests passed. • OpenAPI check passed. • Added regression tests for retention, enrollment classification, permission revocation, and index upgrades. • Live MySQL/PostgreSQL migration tests were skipped because test databases were unavailable. Operational notes Audit cleanup runs at API startup and hourly. Configure a longer retention period before rollout if needed. Historical enrollment counts are not reconstructed from generic node audit rows. jmpsec/osctrl