codeburn/app/electron
ozymandiashh db39157ea6 fix(telemetry): cap cli_error per kind per day, flush app_close on quit
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.
2026-07-18 23:06:30 +03:00
..
quota feat(app): refresh cadence, instant switching, cache coherence, telemetry v1 2026-07-16 11:47:05 -07:00
cli.test.ts fix(app): resolve bundled CLI on Windows + enrich cli_error telemetry 2026-07-17 13:51:35 -07:00
cli.ts fix(app): resolve bundled CLI on Windows + enrich cli_error telemetry 2026-07-17 13:51:35 -07:00
main.test.ts fix(telemetry): cap cli_error per kind per day, flush app_close on quit 2026-07-18 23:06:30 +03:00
main.ts fix(telemetry): cap cli_error per kind per day, flush app_close on quit 2026-07-18 23:06:30 +03:00
preload.ts feat(app): update-available notifications 2026-07-17 04:58:13 -07:00
telemetry.test.ts fix(telemetry): cap cli_error per kind per day, flush app_close on quit 2026-07-18 23:06:30 +03:00
telemetry.ts fix(telemetry): cap cli_error per kind per day, flush app_close on quit 2026-07-18 23:06:30 +03:00
updates.test.ts feat(app): update-available notifications 2026-07-17 04:58:13 -07:00
updates.ts feat(app): update-available notifications 2026-07-17 04:58:13 -07:00