hermes-agent/apps/desktop/electron
Brooklyn Nicholson 146e77684b fix(desktop): bound desktop.log via cascade rotation + reclaim oversized logs
Supersedes the single-.1 rotation from the prior commit, which only bounded
FUTURE growth: rotating a pre-existing oversized desktop.log just renamed the
monster to .1 (no disk reclaimed) and left it stranded until a second rotation
cycle that a now-healthy app may never reach. The ~326 GB file that motivated
this PR would therefore persist as desktop.log.1 after the user updated.

Two changes bring desktop.log in line with the Python-side logs
(hermes_logging.py RotatingFileHandler, maxBytes x backupCount):

1. Cascade rotation: live -> .1 -> .2 -> .3, dropping the oldest. Steady-state
   usage is bounded at ~(backupCount + 1) x cap regardless of loop intensity,
   instead of the old ~2x with a single backup.

2. Pathological-size discard: a file past 4x the cap is a boot-loop artifact
   with no diagnostic value — delete it (and any equally poisoned backups)
   outright instead of relocating the disk-exhaustion problem into a sibling.
   This is what lets an updated app self-heal a disk a stale build filled,
   on the very next launch, rather than one rotation cycle later.

Behavior verified against a real filesystem in a temp dir: under cap -> no
rotation; normal overflow -> live becomes .1; repeated overflow keeps exactly
backupCount backups (no .4) with total bounded; a pathological live file plus
poisoned backups are all reclaimed. node --check passes.

Co-authored-by: The Garden <chilltulpa@gmail.com>
2026-06-06 12:43:28 -05:00
..
backend-probes.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
backend-probes.test.cjs chore(desktop): zero eslint/typecheck debt + prettier pass (#39100) 2026-06-04 14:10:38 +00:00
bootstrap-platform.cjs chore(desktop): zero eslint/typecheck debt + prettier pass (#39100) 2026-06-04 14:10:38 +00:00
bootstrap-platform.test.cjs chore(desktop): zero eslint/typecheck debt + prettier pass (#39100) 2026-06-04 14:10:38 +00:00
bootstrap-runner.cjs chore(desktop): zero eslint/typecheck debt + prettier pass (#39100) 2026-06-04 14:10:38 +00:00
bootstrap-runner.test.cjs feat(desktop): cancellable first-launch install 2026-06-02 08:50:45 -05:00
connection-config.cjs feat(desktop): per-profile remote gateway hosts (#39778) 2026-06-05 12:14:18 +00:00
connection-config.test.cjs feat(desktop): per-profile remote gateway hosts (#39778) 2026-06-05 12:14:18 +00:00
entitlements.mac.inherit.plist fix(desktop): inherit microphone entitlement for macOS helpers 2026-06-03 07:32:00 +07:00
entitlements.mac.plist Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
gateway-ws-probe.cjs test(desktop): add injectable gateway WebSocket probe + unit tests 2026-06-04 19:49:06 -07:00
gateway-ws-probe.test.cjs test(desktop): add injectable gateway WebSocket probe + unit tests 2026-06-04 19:49:06 -07:00
hardening.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
hardening.test.cjs Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
main.cjs fix(desktop): bound desktop.log via cascade rotation + reclaim oversized logs 2026-06-06 12:43:28 -05:00
oauth-net-request.cjs fix(desktop): avoid restricted oauth request header 2026-06-05 18:04:45 -07:00
oauth-net-request.test.cjs fix(desktop): avoid restricted oauth request header 2026-06-05 18:04:45 -07:00
preload.cjs feat(desktop): per-profile remote gateway hosts (#39778) 2026-06-05 12:14:18 +00:00