Skip to content

fix: signal normal REST SSE stream completion - #1209

Open
SashaMIT wants to merge 1 commit into
a2aproject:mainfrom
SashaMIT:issue-1194
Open

SashaMIT wants to merge 1 commit into
a2aproject:mainfrom
SashaMIT:issue-1194

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Oct 9, 2026 •

Copy link
Copy Markdown

Description

REST sendMessageStreaming and subscribeToTask ignored the HTTP client's normal completion callback, so a stream that ended without a final task event never notified the caller. JSON-RPC already turns that callback into onComplete(), and signalTerminal(null) is the success signal.

Parse failures now use the same one-shot callback. A completion that arrives after a parse error cannot replace the error with success.

#1202 cancels in-flight streams on close() and left this end-of-stream signal out. This change is only the completion callback.

Test plan

  • RestTransportTest#testSendMessageStreamingSignalsNormalCompletion (non-final TASK_STATE_SUBMITTED, then connection end, error consumer receives null)
  • Without the callback that test waits out and fails
  • SSEEventListenerTest covers onComplete and an error that must win over a later completion
  • testVersionNotSupportedErrorUnmarshallingStreaming still receives the error

Fixes #1194

REST sendMessageStreaming and subscribeToTask dropped the HTTP client's
normal completion callback. JSON-RPC already turns that callback into a
null terminal signal. Parse errors now use the same one-shot callback so
a later completion cannot replace them with success.

Fixes a2aproject#1194

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: REST transport never signals normal stream completion to the client (SSE hangs until timeout)

1 participant