codeburn/tests
iamtoruk 2fb078bdfb Fix V8 OOM crash on 30-day period with Buffer-based line reader and large-line parser
Three-layer fix for V8 heap exhaustion when parsing heavy session data:

1. Buffer-based readSessionLines (fs-utils.ts): Replace readline with raw
   Buffer streaming using Buffer.indexOf(0x0a). Eliminates ConsString trees
   that caused OOM when regex-flattening 100MB+ lines. Two-state machine
   (ACCUMULATING/SCANNING) skips old lines at ~2KB cost instead of 200MB.

2. Large-line streaming parser (parser.ts): Hand-written JSON scanner for
   lines >32KB extracts only cost/token/tool fields without JSON.parse,
   avoiding full object graph allocation. Dual string/Buffer paths.

3. Dashboard memory management (dashboard.tsx): Disable auto-refresh for
   heavy periods (30d/month/all), clear old dataset before reload via
   nextTick to allow GC, prevent overlapping reloads with mutex, lazy
   optimize scanning on keypress instead of useEffect.

Also fixes three race conditions in dashboard reload deduplication:
- Early return after nextTick bypassing finally block (permanent mutex lock)
- A->B->A period switching dropping final reload (stale pending)
- Stale pendingReloadRef not cleared when in-flight matches request
2026-05-15 23:15:26 -07:00
..
fixtures/security test(security): add failing test for HIGH-1 prototype pollution 2026-04-17 08:32:18 +02:00
providers Fix OpenCode MCP usage reporting (#318) 2026-05-11 21:30:27 -07:00
security feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
bash-commands.test.ts chore: hoist Pi model sort + cover bash-utils edge cases 2026-04-16 02:02:32 -07:00
blob-to-text.test.ts Harden menubar refresh recovery 2026-05-11 20:44:06 -07:00
classifier.test.ts Classifier: feature verb wins over debug keyword (part of #196) (#289) 2026-05-09 22:48:11 -07:00
cli-date.test.ts Reject invalid --format and --period values instead of silently falling back (#258) 2026-05-06 23:03:41 -07:00
cli-export-date-range.test.ts feat(export): support custom date ranges 2026-05-05 23:18:48 -07:00
cli-json-daily.test.ts Expose per-day one-shot data in daily JSON output (#279) (#280) 2026-05-09 21:01:05 -07:00
cli-plan.test.ts feat(plan): subscription plan tracking with usage progress bar 2026-04-21 04:20:50 -07:00
cli-status-menubar.test.ts Sync package-lock.json to 0.9.9 and fix flaky menubar test 2026-05-15 20:03:44 -07:00
compare-stats.test.ts fix(classifier): surface skill name as subCategory for general turns (#203) 2026-05-04 06:26:45 +08:00
currency-rounding.test.ts Menubar and CLI hardening from multi-agent audit (#257) 2026-05-06 22:15:11 -07:00
daily-cache.test.ts Fix Claude 1-hour cache write pricing (#317) 2026-05-11 21:23:04 -07:00
dashboard.test.ts Fix mangled project paths in dashboard (#320) 2026-05-11 22:02:38 -07:00
date-range-filter.test.ts Menubar and CLI hardening from multi-agent audit (#257) 2026-05-06 22:15:11 -07:00
day-aggregator.test.ts Drop Z suffix from day-aggregator test timestamps for timezone stability (#322) 2026-05-11 22:25:32 -07:00
export.test.ts feat(report): add per-model efficiency metrics 2026-05-05 23:36:59 -07:00
fs-utils.test.ts Fix V8 OOM crash on 30-day period with Buffer-based line reader and large-line parser 2026-05-15 23:15:26 -07:00
mcp-coverage.test.ts Fix cache-write pricing and shell-quote server names in fix commands 2026-05-04 20:11:50 -07:00
menubar-installer.test.ts Harden menubar refresh and installer 2026-05-14 18:32:15 -07:00
menubar-json.test.ts feat(mac): native Swift menubar app + one-command install 2026-04-17 16:55:56 -07:00
minimax.test.ts feat: add MiniMax-M2.7 and MiniMax-M2.7-highspeed model pricing 2026-04-21 05:50:52 -07:00
model-efficiency.test.ts feat(report): add per-model efficiency metrics 2026-05-05 23:36:59 -07:00
models-hoist.test.ts Validator hardenings on the bug-hunt batch (#254) 2026-05-06 19:50:40 -07:00
models-report.test.ts Add codeburn models per-model + per-task breakdown command (#287) 2026-05-09 20:45:21 -07:00
models.test.ts Fix Claude 1-hour cache write pricing (#317) 2026-05-11 21:23:04 -07:00
optimize-fs.test.ts Fix V8 OOM crash on 30-day period with Buffer-based line reader and large-line parser 2026-05-15 23:15:26 -07:00
optimize.test.ts Label optimize suggestions by destination (#281) 2026-05-08 23:30:53 -07:00
parser-claude-cwd.test.ts Fix Claude 1-hour cache write pricing (#317) 2026-05-11 21:23:04 -07:00
parser-compact-entry.test.ts Fix V8 OOM crash on 30-day period with Buffer-based line reader and large-line parser 2026-05-15 23:15:26 -07:00
parser-filter.test.ts test: cover filterProjectsByName include/exclude semantics 2026-04-16 15:49:57 -07:00
parser-large-json-scanner.test.ts Fix V8 OOM crash on 30-day period with Buffer-based line reader and large-line parser 2026-05-15 23:15:26 -07:00
parser-large-session.test.ts Fix V8 OOM crash on 30-day period with Buffer-based line reader and large-line parser 2026-05-15 23:15:26 -07:00
parser-mcp-inventory.test.ts feat(optimize): MCP tool coverage detector with cache-aware costing 2026-05-05 04:13:04 +03:00
parser-skip-line.test.ts Fix V8 OOM crash on 30-day period with Buffer-based line reader and large-line parser 2026-05-15 23:15:26 -07:00
plan-usage.test.ts feat(plan): subscription plan tracking with usage progress bar 2026-04-21 04:20:50 -07:00
plans.test.ts feat(plan): subscription plan tracking with usage progress bar 2026-04-21 04:20:50 -07:00
provider-registry.test.ts Add IBM Bob provider with workspace extraction (#316) 2026-05-11 20:54:13 -07:00