summaryrefslogtreecommitdiff
path: root/tests/opencode/test-bootstrap-caching.mjs
diff options
context:
space:
mode:
authorJesse Vincent <jesse@primeradiant.com>2026-06-09 15:22:23 -0700
committerDrew Ritter <drew@primeradiant.com>2026-06-16 10:09:45 -0700
commitdd9fcc21ee08c36b66ca7d730abd28f679ccf1f5 (patch)
treebf5aeec43e3e7f159a0ea4ddc20728f9e8a507df /tests/opencode/test-bootstrap-caching.mjs
parent36ac3e1336065703cd518e9bf5e0a31ffdfb4046 (diff)
feat(brainstorm-server): reuse the same port on session restart
When the companion idle-shuts-down and the agent restarts it, a fresh random port meant the user's open browser tab pointed at a dead URL. Persist the bound port per project and prefer it on the next start, so the restarted server comes up on the same port and the open tab's reconnect just works. - start-server.sh exports BRAINSTORM_PORT_FILE=<project>/.superpowers/brainstorm/ .last-port for project sessions (not /tmp). - server.cjs prefers an explicit BRAINSTORM_PORT, else the recorded port, else random; writes the actually-bound port back; and on EADDRINUSE (preferred port still in use) falls back to a random port once instead of crashing. lifecycle.test.js: restart reuses the recorded port; a taken preferred port falls back to a random one without crashing. Refs #1237
Diffstat (limited to 'tests/opencode/test-bootstrap-caching.mjs')
0 files changed, 0 insertions, 0 deletions