gstack/browse
Salim Habash 33143ad923 fix(bun-polyfill): cap spawned-pipe buffer to prevent OOM
Codex review pass 3 flagged a [P2]: the unbounded eager-drain buffer
defeats the consumer's existing readCapped at the call site. A runaway
child that prints hundreds of MB before timing out now balloons server
memory regardless of the consumer's documented 1 MB cap.

Cap the per-pipe drain at 16 MB by default (GSTACK_SPAWN_MAX_BUFFER
overrides), generous for every real use case (DPAPI ~32B, tasklist <1KB,
codex review ~100KB) and small enough to bound worst-case memory. Past
the cap, the pipe keeps flowing so the child never blocks in write(),
but further bytes are discarded. Consumers reading the replay stream
see exactly MAX_BUFFER bytes; the existing readCapped at browser-skill-
commands then applies its own 1 MB cap on top with no surprises.

Regression test sets GSTACK_SPAWN_MAX_BUFFER=1024, has the child write
10 KB, asserts captured stdout is exactly 1024 bytes and exit resolves
cleanly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 00:46:17 -07:00
..
bin feat: multi-agent support — gstack works on Codex, Gemini CLI, and Cursor (v0.9.0) (#226) 2026-03-19 18:20:50 -07:00
scripts fix: ngrok Windows build + close CI error-swallowing gap (v0.18.0.1) (#1024) 2026-04-16 13:49:04 -07:00
src fix(bun-polyfill): cap spawned-pipe buffer to prevent OOM 2026-05-27 00:46:17 -07:00
test fix(bun-polyfill): cap spawned-pipe buffer to prevent OOM 2026-05-27 00:46:17 -07:00
PLAN-snapshot-dropdown-interactive.md fix: snapshot -i auto-detects dropdown/popover interactive elements (#845) 2026-04-05 22:57:45 -07:00
SKILL.md v1.47.0.0 feat: /spec — author backlog-ready spec in 5 phases + optional agent spawn (#1698) (#1733) 2026-05-26 21:36:53 -07:00
SKILL.md.tmpl v1.28.0.0 feat: browse --headed/--proxy/--navigate + gstack/llms.txt + webdriver-only stealth (#1363) 2026-05-07 20:14:59 -07:00