mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-11-29 10:43:47 +00:00
Two robustness fixes from the #741 telemetry audit: - cli_error had no rate limit: one install emitted 804 timeout events in a single day (56% of all events ever received). track() now caps cli_error at 20 per kind per calendar day. The day and per-kind counts persist in the telemetry state file (defensively loaded), so app relaunches within the same day cannot reset the budget; other event names are unaffected. - app_close almost never fired (1 close vs 48 opens): the quit path raced the outbound POST. before-quit now defers quit once, tracks the close and flushes with a bounded wait (1500ms race), then quits. Every step of the handler is independently guarded so a synchronous failure can neither skip the flush nor wedge quitting, and a full queue evicts its oldest event rather than dropping app_close. Disabled or not-onboarded telemetry quits instantly. |
||
|---|---|---|
| .. | ||
| quota | ||
| cli.test.ts | ||
| cli.ts | ||
| main.test.ts | ||
| main.ts | ||
| preload.ts | ||
| telemetry.test.ts | ||
| telemetry.ts | ||
| updates.test.ts | ||
| updates.ts | ||