What happened?
The A2A server streaming /executeCommand endpoint writes Server-Sent Events with a single trailing newline:
res.write(`data: ${JSON.stringify(jsonRpcResponse)}\n`);
A spec-compliant SSE/EventSource client requires a blank line (\n\n) to dispatch an event. Without that blank line, consecutive data: 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 \n instead of \n\n. The existing streaming test did not catch this because it used a Mocha-style done callback, 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
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