singularity-forge/src/resources
Flux Labs b0f880689b fix: prevent heap OOM during long-running auto-mode sessions (#611) (#613)
Multiple sources of unbounded memory growth caused V8 to OOM after
~50 minutes of auto-mode operation:

1. activity-log.ts: saveActivityLog serialized ALL session entries
   into a single string for SHA1 dedup, allocating hundreds of MB
   per unit cycle. Now uses streaming writes (writeSync per entry)
   and a lightweight fingerprint (entry count + last 3 entries hash)
   instead of full-content hashing.

2. activity-log.ts: activityLogState Map was never cleared between
   sessions, accumulating lastSnapshotKeyByUnit entries indefinitely.
   Added clearActivityLogState() export, called from stopAuto().

3. auto.ts: completedUnits array grew unbounded for dashboard
   display. Now capped at 200 entries and cleared on stopAuto().

4. paths.ts: dirEntryCache and dirListCache Maps grew without bounds
   between clearPathCache() calls. Added DIR_CACHE_MAX (200) eviction
   — when cache exceeds limit, it's cleared before adding new entries.

Closes #611
2026-03-16 06:57:39 -06:00
..
agents Initial commit 2026-03-10 22:28:37 -06:00
extensions fix: prevent heap OOM during long-running auto-mode sessions (#611) (#613) 2026-03-16 06:57:39 -06:00
skills fix: add missing front matter to github-workflows skill 2026-03-14 15:24:07 -04:00
GSD-WORKFLOW.md docs: sync GSD workflow resource (#476) 2026-03-15 18:23:52 -06:00