- Number test server connections before upgrading in TestWebsocketRetryBindFailureClearsActiveSessionState so connection order matches sequential client dials.
- Wait for the client request payload to arrive before sending the completion frame and closing the server socket in xAI keepalive upload tests, and guard hook channel closes with sync.Once.
Closes: #6983
- Introduced per-connection active channel management for Codex and XAI websocket sessions.
- Enhanced session behavior to support clearing and reassigning active channels tied to specific connections.
- Added support for detecting and detaching stale connections upon session target changes.
- Refactored websocket message handling logic to ensure connection-specific channel consistency.
- Extended test coverage for websocket session behaviors, including reconnections, target switching, and pinned auth transitions.