summaryrefslogtreecommitdiff
path: root/tests/opencode/setup.sh
diff options
context:
space:
mode:
authorJesse Vincent <jesse@primeradiant.com>2026-06-09 15:59:59 -0700
committerDrew Ritter <drew@primeradiant.com>2026-06-16 10:09:45 -0700
commitfb08947dedcb206dc783188951c17f18a0cbc399 (patch)
tree66c40dde1b7dc67e89c4cedcee9638e346e62ab7 /tests/opencode/setup.sh
parent5a0f895387c53e26148db5b81c4f62368e262174 (diff)
fix(brainstorm-server): address adversarial review findings
From a two-reviewer adversarial pass: - [High] EADDRINUSE fallback clobbered the shared .last-port: onListen wrote the bound port unconditionally, so a fallback to a random port overwrote the preferred port another live session still owns — stranding that session's open tab forever. Now persist only when we bound the preferred port (not on fallback). The fallback test now asserts .last-port integrity (teeth-verified). - [Medium] maybeOpenBrowser ran the URL through a shell (exec + JSON.stringify), which does NOT neutralize $(...) in a url-host. Platform launchers now use execFile with the URL as an argv element (no shell). The operator-set BRAINSTORM_OPEN_CMD path stays shell-based (trusted input). - [Medium] --open was a silent no-op on native Windows (no win32 branch). Added. - [Medium] helper.js reconnect/status/tombstone had only substring-grep tests. Added behavioral tests driving the state machine against a mocked browser: Reconnecting+backoff (500->1000->2000), tombstone after the grace period, and reload-on-recovery. - [Low] status pill showed a false 'Connected' before the socket opened; now starts 'Connecting…' until onopen. Not changed (flagged): stop-server.sh's PID-ownership check still matches any 'node ... server.cjs' (narrow residual — a recycled PID onto an unrelated node server.cjs); robust fix needs fragile cross-platform process introspection.
Diffstat (limited to 'tests/opencode/setup.sh')
0 files changed, 0 insertions, 0 deletions