-
Notifications
You must be signed in to change notification settings - Fork 92
refactor(DATAGO-124692): add persistent SSE event buffer for background task replay #996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WhiteSource Policy Violation Summary✅︎ No Blocking Whitesource Policy Violations found in solaceai/solace-agent-mesh-ui-pr-996! |
…with buffer cleanup
…mir/bg-refactor-fe
efunneko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is missing auth checks in one endpoint, which needs to be addressed
We should also make sure there are tests to verify the auth for accessing the new endpoints
…prevent "cannot commit - no transaction is active" SQLite error`
|
efunneko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
…nd task replay (#996) This implements a robust system for replaying buffered SSE events for background tasks, ensuring that when a user returns to a session, all agent messages and embeds are processed through the same frontend code path as live streaming. This guarantees consistency and proper embed resolution, even if tasks completed while the user was away. The changes span frontend logic, backend embed resolution logging, and database schema updates.




This pull request implements a robust system for replaying buffered SSE events for background tasks, ensuring that when a user returns to a session, all agent messages and embeds are processed through the same frontend code path as live streaming. This guarantees consistency and proper embed resolution, even if tasks completed while the user was away. The changes span frontend logic, backend embed resolution logging, and database schema updates.
Frontend: Background Task Replay & Consistency
ChatProvider.tsxto detect background tasks with buffered events and replay them using a newreplayBufferedEventsfunction, ensuring agent messages and embeds are resolved consistently via SSE processing. [1] [2] [3] [4] [5] [6] [7] [8]Backend: Database & Migration
sse_event_buffertable for persisting SSE events, with indexes and additional columns in thetaskstable to track event buffer state. This enables efficient event replay and state tracking for background tasks.Backend: Embed Resolution Debugging
resolver.py) and gateway component (component.py) to include more context about embed types, input text, and resolved output, aiding in debugging and traceability of embed processing. [1] [2] [3] [4]