Skip to content

fix(server): surface producer errors after failed tasks - #1229

Merged
mykytanetipa merged 1 commit into
a2aproject:mainfrom
dawNotPoi:fix/1228-failed-task-error
Sep 7, 2026
Merged

fix(server): surface producer errors after failed tasks#1229
mykytanetipa merged 1 commit into
a2aproject:mainfrom
dawNotPoi:fix/1228-failed-task-error

Conversation

@dawNotPoi

Copy link
Copy Markdown
Contributor

Description

Blocking message/send previously stopped consuming as soon as a FAILED Task replacement arrived. If the producer then raised, the subscriber never observed that exception and the request returned the failed Task as a successful RPC result.

This keeps a FAILED Task as the fallback response but continues consuming until the current request completes, the stream closes, or the producer error arrives. A clean agent-declared failure still returns its Task; a producer crash now surfaces its original exception. Other terminal states and return_immediately retain their existing behavior.

  • Follow the CONTRIBUTING Guide.
  • Make the Pull Request title follow the Conventional Commits specification.
  • Ensure the tests and linter pass.
  • Appropriate docs were updated (not necessary for this internal behavior fix).

Test plan

  • ./scripts/lint.sh
  • uv run pytest — 1,987 passed, 90 skipped, 3 xfailed, 1 xpassed
  • uv run pytest --cov=src --cov-report=term-missing — 93% total coverage
  • Focused request-handler regression matrix — 7 passed

Fixes #1228 🦕

AI assistance

Codex was used for implementation, testing, and independent code review. This Draft remains subject to human review.

Signed-off-by: dawn <93917549+dawNotPoi@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

🧪 Code Coverage (vs main)

⬇️ Download Full Report

Base PR Delta
src/a2a/server/request_handlers/default_request_handler_v2.py 92.44% 92.53% 🟢 +0.09%
Total 93.05% 93.06% ⚪️ 0.00%

Generated by coverage-comment.yml

@dawNotPoi
dawNotPoi marked this pull request as ready for review September 4, 2026 07:15
@dawNotPoi
dawNotPoi requested a review from a team as a code owner September 4, 2026 07:15

@mykytanetipa mykytanetipa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mykytanetipa
mykytanetipa merged commit bc32d7e into a2aproject:main Sep 7, 2026
17 checks passed
mykytanetipa pushed a commit that referenced this pull request Sep 8, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.1.4](v1.1.3...v1.1.4)
(2026-09-07)


### Features

* **itk:** register itk-python-v10-agent as a uv workspace member and
update dependency version markers
([#1203](#1203))
([6eee895](6eee895))
* **itk:** use shared scenarios
([#1201](#1201))
([b4a0b21](b4a0b21))


### Bug Fixes

* make event queue sink removal idempotent
([#1134](#1134))
([58c72c6](58c72c6))
* omit artifacts from list tasks responses
([#1212](#1212))
([35ef52e](35ef52e))
* owner-scope cancel/subscribe and write terminal state on cancel
([#1159](#1159),
[#1170](#1170))
([#1172](#1172))
([ddbf853](ddbf853))
* prevent first-owner write loss in in-memory stores
([#1194](#1194))
([bcc489c](bcc489c))
* **server:** let subscriber taps evict on full instead of wedging
dispatch ([#1137](#1137))
([0c2126f](0c2126f))
* **server:** surface producer errors after failed tasks
([#1229](#1229))
([bc32d7e](bc32d7e))
* **server:** validate push-notification URLs at config creation
([#1173](#1173))
([3eb88e2](3eb88e2))
* **server:** validate push-notification URLs before dispatch (SSRF
hardening)
([#1164](#1164))
([57a9df3](57a9df3))
* **server:** warn when queue_manager is ignored in
DefaultRequestHandlerV2
([#1153](#1153))
([08fd223](08fd223))


### Documentation

* **server:** say what the evict-on-full check actually tests
([#1209](#1209))
([4b7b242](4b7b242))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

blocking on_message_send treats a FAILED Task as a successful result

2 participants