Repository navigation
fix(a2a): propagate transport, protocol and remote task failures as structured errors (issue #213) - #371
Conversation
…tructured errors (issue agentic-ai-java#213)
yuluo-yx
left a comment
There was a problem hiding this comment.
dispatchSseEvent() returns on completed status before extracting Task artifacts. Reproduced an SSE frame containing a completed Task with artifact text "answer": only done is emitted and the final result is {reply=""}. Extract the completed Task output before terminating and add a regression test.
|
Thanks for the repro — confirmed and fixed in b0c8557. Root cause: Fix: the completed flag is now evaluated first and the frame's output is extracted and delivered (accumulated + emitted) before the event terminates the stream. A terminal frame with no extractable output still terminates cleanly, and plain Regression test |
|
Note on the red Evidence so far:
The failure mode is a permit-waiter race: with I pushed an empty commit (ec8a289) to re-run the suite. If it flakes again I'm happy to open an upstream issue with this analysis, or to look at making the waiter stop deterministic. |
yuluo-yx
left a comment
There was a problem hiding this comment.
dispatchSseEvent() ignores final:true. A valid status-update with state=input-required and final=true is followed by A2aProtocolException at EOF because only completed or [DONE] terminates successfully. Honor the final flag after classifying remote failures and add a regression test for this normal interaction boundary.
…lassification (issue agentic-ai-java#213)
|
Fixed in 3541a9c.
Two regression tests added:
Test class 26/26, full |
Contributing to ARGI: propagate A2A streaming and single-body transport, protocol and remote task failures as structured terminal errors (A2aTransportException/A2aProtocolException/A2aRemoteTaskException extending IllegalStateException for legacy catch compatibility) instead of error text followed by a normal done completion — SSE wire-format framing (comments/unknown fields ignored, multi-data lines joined, [DONE] or completed status terminates, missing terminal state fails), JSON-RPC error frames, corrupt frames and remote failed/canceled tasks (both status-update events and Task objects) surface through the existing GraphResponse.error channel with at most one terminal state and partial output identity preserved, error-looking remote body text never treated as a control signal (issue #213).