Loading
Add BufferedEventHub for Duo Chat streaming
What does this MR do and why?
First of three MRs splitting the Duo Agentic Chat WebSocket service layer into independently reviewable pieces. This one adds BufferedEventHub on its own; nothing consumes it yet.
Duo Chat's WebSocket layer needs subscribers to receive messages that arrived before they subscribed. A reconnect, or a component mounting mid-stream, otherwise silently drops every frame delivered in the gap.
BufferedEventHub wraps ~/helpers/event_hub_factory with:
- a bounded message buffer (max 1000) for one designated event type
- replay of that buffer to each new subscriber of the designated event
- a
try/catcharound every subscriber callback that reports to Sentry, so one failing consumer cannot stop the others
Chain
| MR | Delivers | |
|---|---|---|
| 1 | this MR | BufferedEventHub |
| 2 | !247787 (merged) | WorkflowStream |
| 3 | !249096 (merged) | RetryableWorkflowStream + factory |
| 4 | !245705 (merged) | Wiring + retry UX |
Targets feature/dws-websocket-simulator (!247786 (merged)).
How to validate
yarn jest ee/spec/frontend/ai/duo_agentic_chat/websocket/buffered_event_hub_spec.jsNo user-facing change, so no changelog entry.
Edited by Enrique Alcántara