diff options
| author | Jesse Vincent <jesse@primeradiant.com> | 2026-06-09 15:08:09 -0700 |
|---|---|---|
| committer | Drew Ritter <drew@primeradiant.com> | 2026-06-16 10:09:45 -0700 |
| commit | 56757f68773fc83a481266ebef4b1c3df16452a5 (patch) | |
| tree | 035cfdab8802770cc9f66e84b3fca90d4eac9126 /tests/opencode/test-plugin-loading.sh | |
| parent | 5ddce063df0b018ef1e972177919b302d1c3430e (diff) | |
feat(brainstorm-server): 4h configurable idle timeout; close WS on shutdown
The companion shut down after only 30 minutes idle — too short for real
brainstorming, where a single question can sit far longer. And shutdown() never
closed upgraded WebSocket sockets, so an open browser connection could keep the
Node process alive after it was supposed to exit.
- Default idle timeout raised to 4 hours, configurable via BRAINSTORM_IDLE_TIMEOUT_MS
and start-server.sh --idle-timeout-minutes (validated positive integer).
- Reported as idle_timeout_ms in the server-started JSON / server-info.
- shutdown() now destroys all client sockets so the process exits even with an
open WebSocket.
- Watchdog check interval is configurable (BRAINSTORM_LIFECYCLE_CHECK_MS, default
60s) so the lifecycle can be tested without minute-long waits.
Adds lifecycle.test.js (configured timeout reported; idle shutdown exits despite
an open WS — teeth-verified; the start-server flag). Wires ws-protocol,
lifecycle, and stop-server suites into npm test.
Closes #1237
Refs #1689
Diffstat (limited to 'tests/opencode/test-plugin-loading.sh')
0 files changed, 0 insertions, 0 deletions
