Skip to content

fix: the audit list is bounded; metrics count in SQL - #69

Open
alexeybe1kin wants to merge 8 commits into
mainfrom
fix/audit-list-bounded
Open

alexeybe1kin wants to merge 8 commits into
mainfrom
fix/audit-list-bounded

Conversation

@alexeybe1kin

Copy link
Copy Markdown
Collaborator

Hunt finding memorygate-1 F16.

GET /audit returned every audit row ever written, and the table grows with every read. It now returns the newest limit rows (default 500, 1..2000), with the same array shape. /audit/metrics counts with GROUP BY instead of loading every row of the window.

Not changed: there is no agent scope. The route is admin-only, audit rows carry the agent only inside payload_json, and the dashboard filters by agent itself.

Tests: tests/test_audit_list_bounded.py (fails on main: limit was ignored); test_audit_metrics still passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant