-
Notifications
You must be signed in to change notification settings - Fork 14k
Bug: /executeCommand SSE stream omits blank-line event delimiters #27587
Copy link
Copy link
Labels
area/non-interactiveIssues related to GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automationIssues related to GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automationeffort/medium2-3 days: UI state, async flow, cross-component refactors2-3 days: UI state, async flow, cross-component refactorskind/bugpriority/p2Important but can be addressed in a future release.Important but can be addressed in a future release.status/bot-triagedstatus/need-information
Metadata
Metadata
Assignees
Labels
area/non-interactiveIssues related to GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automationIssues related to GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automationeffort/medium2-3 days: UI state, async flow, cross-component refactors2-3 days: UI state, async flow, cross-component refactorskind/bugpriority/p2Important but can be addressed in a future release.Important but can be addressed in a future release.status/bot-triagedstatus/need-information
Type
Fields
Give feedbackNo fields configured for Bug.
Projects
StatusShow more project fields
No status
What happened?
The A2A server streaming
/executeCommandendpoint writes Server-Sent Events with a single trailing newline:A spec-compliant SSE/EventSource client requires a blank line (
\n\n) to dispatch an event. Without that blank line, consecutivedata:lines are folded into one record and the final event is never properly terminated, so clients cannot parse individual streaming updates.What did you expect to happen?
Each JSON-RPC response emitted by the streaming endpoint should be a separate SSE event, delimited by a blank line:
Root cause
The handler emits
\ninstead of\n\n. The existing streaming test did not catch this because it used a Mocha-styledonecallback, which Vitest 3 does not honor, so the test returned before its asynchronous assertions ran.Proposed fix
Append the missing blank line to each event and convert the streaming test to async/await so it genuinely validates emitted events.
Related PR: #27549