The Rust client’s subscribed to the architect:flow:execution notification stream via the WebSocket endpoint. Everything runs smooth until the IVR hits the “Transfer to Queue” block. Tokio keeps the connection alive, but the incoming frame throws a deserialize panic. Serde expects the standard wrapper, yet the payload structure shifts completely when context routing engages.
Flow version sits at 14.2.88. US1 environment. Client runs tokio-tungstenite 0.21 alongside serde 1.0.193. Authentication handles the HMAC signing correctly, verified against the webhook secret. The issue surfaces specifically when the gather input block times out and routes to the fallback queue.
Logs show the stream pushing a raw event array instead of the documented object envelope. Parsing fails immediately. Connection drops to 1006 within 200ms. Retrying the subscription just loops the same malformed frame. Console output looks like this:
2024-05-12T14:32:18.044Z WARN tokio_tungstenite::client: frame received
2024-05-12T14:32:18.045Z ERROR notification_handler: deserialize error: data did not match any variant of untagged enum FlowEvent
payload: [{"event_type":"routing.queue.conversation","id":"a1b2c3d4","timestamp":"2024-05-12T14:32:18.042Z","data":{"queue_id":"xyz","state":"queued"}}]
The notification API docs still list the single-object wrapper format. Switching to serde_json::Value bypasses the crash, but the event routing logic falls apart without strict typing. The schema doesn’t match the published spec. It’s breaking the pipeline completely. Latency spikes to 450ms right before the frame arrives, maybe a server-side buffer flush issue. Architect flow shows no validation errors. Queue capacity sits at 12 agents, fully staffed. Mic stays hot during testing, but the stream keeps choking on that exact transition.
Checking the raw socket buffer now.