-
Notifications
You must be signed in to change notification settings - Fork 282
Description
Problem
The OpenClawGatewayAdapter connect handshake sends minProtocol and maxProtocol in the connect params, but there is no test coverage verifying these fields are included in the actual WebSocket request.
Debugging Context
When Studio failed to connect with a generic "Disconnected" state, I added debug logging to capture the actual WebSocket frames. Without existing tests that verify the exact params structure, I had no reliable way to confirm whether the protocol fields were being sent correctly. The code appeared correct when reading the source:
const baseParams = {
minProtocol: args.protocol,
maxProtocol: args.protocol,
...
};But without a test capturing the actual sent params, I couldn't rule out transpilation issues, bundler behavior, or subtle bugs.
Solution
Add a test that captures and verifies the connect request params include minProtocol and maxProtocol set to the expected protocol version (3). This makes debugging connection issues more straightforward.
Context
- openclaw-studio version: 0.1.0
- Observed during Docker deployment on VPS
- Gateway accessible at ws://localhost:18792