Fix worker session handshake completion process #201

Merged
rwachters merged 1 commit from fix-worker-session-handshake-state-management into change-mcp-tool-call-architecture 2026-04-24 19:31:34 +00:00
rwachters commented 2026-04-24 19:31:20 +00:00 (Migrated from github.com)

Summary

This pull request improves the handling of WebSocket session handshakes within the worker. Key changes include:

  • Replacing SessionHandshakeStateStore with SessionHandshakeContext for better session-scoped handshake management.
  • Updating WebSocketSessionRunner to actively monitor handshake completion and close sessions that fail or time out.
  • Enhancing WorkerProtocolMessageRouter to reject command messages if the handshake is incomplete.
  • Consolidating CommandMessageHandler logic into the router for better handling of incomplete interactions.
  • Adding new rejection reasons (HANDSHAKE_NOT_COMPLETE, INVALID_INTERACTION_ID).
  • Introducing a configurable helloWelcomeTimeoutMs parameter in WebSocketTransportConfig.

Checklist

  • Code has been tested thoroughly
  • Relevant documentation has been updated
### Summary This pull request improves the handling of WebSocket session handshakes within the worker. Key changes include: - Replacing `SessionHandshakeStateStore` with `SessionHandshakeContext` for better session-scoped handshake management. - Updating `WebSocketSessionRunner` to actively monitor handshake completion and close sessions that fail or time out. - Enhancing `WorkerProtocolMessageRouter` to reject command messages if the handshake is incomplete. - Consolidating `CommandMessageHandler` logic into the router for better handling of incomplete interactions. - Adding new rejection reasons (`HANDSHAKE_NOT_COMPLETE`, `INVALID_INTERACTION_ID`). - Introducing a configurable `helloWelcomeTimeoutMs` parameter in `WebSocketTransportConfig`. ### Checklist - [ ] Code has been tested thoroughly - [ ] Relevant documentation has been updated
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Torvian.eu/chatbot!201
No description provided.