Skip to content

fix(streaming): bound subprocess memory - #102

Merged
drewstone merged 1 commit into
mainfrom
fix/bounded-process-stream-memory
Aug 2, 2026
Merged

fix(streaming): bound subprocess memory#102
drewstone merged 1 commit into
mainfrom
fix/bounded-process-stream-memory

Conversation

@drewstone

Copy link
Copy Markdown
Owner

What

  • remove per-event progress timers and repeated reactions retained for the lifetime of a subprocess
  • retain subprocess diagnostics in a fixed 64 KiB head-and-tail buffer across every CLI backend
  • keep model output, token budgets, time budgets, and replay behavior unchanged
  • ignore request-private Pi directories left by hard process exits

Measured evidence

  • failing Discovery run: the bridge reached Node's approximately 4.1 GB heap limit and exited
  • before: 200,000 synthetic Pi events peaked at 525,572 KiB RSS
  • after: 1,600,000 events completed in 1.46 s, peaked at 305,520 KiB RSS, and settled at 41.3 MB heap
  • DeepSeek V4 Flash reviewed the full diff through Pi; its two low-severity findings were fixed before commit

Checks

  • pnpm test: 584 passed, 6 skipped
  • pnpm typecheck
  • git diff --check origin/main...HEAD
  • git merge-tree --write-tree origin/main HEAD

@drewstone
drewstone merged commit 0be5cc3 into main Aug 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant