The audit-retention sweep writes a sys_audit row on every State Store start even when it pruned nothing ({"rows": 0, "cutoff": ...}). 210 of the 625 audit rows on the production instance (a third of the table) are these no-op records, and they appear in the audit feed.
Done when
A retention sweep that prunes zero rows writes no audit row.
Verified by a test that a sweep over an empty range adds no row and one that prunes adds one.
## What is wrong
The audit-retention sweep writes a `sys_audit` row on every State Store start even when it pruned nothing (`{"rows": 0, "cutoff": ...}`). 210 of the 625 audit rows on the production instance (a third of the table) are these no-op records, and they appear in the audit feed.
## Done when
- A retention sweep that prunes zero rows writes no audit row.
- Verified by a test that a sweep over an empty range adds no row and one that prunes adds one.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What is wrong
The audit-retention sweep writes a
sys_auditrow on every State Store start even when it pruned nothing ({"rows": 0, "cutoff": ...}). 210 of the 625 audit rows on the production instance (a third of the table) are these no-op records, and they appear in the audit feed.Done when
Fixed in
5939ef6f: the retention sweep writes its audit row only when it pruned rows. No test: it needs a real database, which the repo forbids.