forked from dries/ocman
fix(opencode): handle duplicate OpenCode servers #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "codex/opencode-port-affinity"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
lsofscan for every session-detail response.200 text/event-streamresponse.Actual issue observed
After fixing tmux launch and fresh port discovery, we were able to create a session, but live behavior still looked wrong when multiple OpenCode servers were running for the same repository directory.
The observed symptom was that a session appeared to keep working continuously, and the answer only visibly settled after pressing Escape. While debugging, we also observed multiple
opencodeservers rooted at the same project directory.That made the next problem different from "can ocman find an OpenCode port at all?": ocman could find a port, but the directory -> port mapping was ambiguous when more than one matching server existed.
What we observed while debugging
/eventSSE proxying, composer sends, shell/command operations, model/info fetches, etc.What we inferred / assumed
Important caveats / implications
Stack
Base:
codex/frontend-test-lint-hygiene(#5).Validation
Run on
codex/opencode-port-affinityafter folding the warning branch into this PR and amending the warning discovery cache:go test ./internal/platforms/opencode ./internal/server— passed.cd frontend && pnpm lint— passed.make test— passed (105frontend test files,1277frontend tests).make lint— still fails at the existing base-branch host-helper check ininternal/server/loop_engine.go.GitNexus:
npx gitnexus analyzebefore the cache edit.npx gitnexus detect-changesmapped the final patch to port-discovery cache/invalidation symbols and the tmux launch/restart flows, which is the expected affected area for this change.5175e2288dto3c5737d3243c5737d324to013123262c013123262ctod2774646a9d2774646a9to86f8a559307a65d789bfto4ab97fb9164ab97fb916tof6c08a5915fix(opencode): keep session live traffic on one portto fix(opencode): handle duplicate OpenCode serversdaed338449to8eb91a8e36Pull request closed