mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-13 18:52:18 +03:00
* perf(logging): bound call-log rotation work * refactor(usage): extract call-log rotation/pruning from callLogs.ts to satisfy the file-size gate Move the bounded rotation scheduler, orphan-artifact scanner, and row/overflow pruning helpers (deleteCallLogsBefore, trimCallLogsToMaxRows, cleanupOverflowCallLogFiles, cleanupOrphanCallLogFiles, rotateCallLogs, scheduleCallLogRotation) into a new src/lib/usage/callLogRotation.ts module. Pure extraction, no behavior change — callLogs.ts re-exports the same public symbols so existing importers (usageDb.ts, compliance/index.ts, the purge-logs route, and the rotation/cap test suite) are unaffected. Brings callLogs.ts from 1108 to 787 lines, under the 1000-line file-size cap. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>