{{ message }}
Repository navigation
Commit bc32d7e
authored
fix(server): surface producer errors after failed tasks (#1229)
# 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.
- [x] Follow the [`CONTRIBUTING`
Guide](https://github.com/a2aproject/a2a-python/blob/main/CONTRIBUTING.md).
- [x] Make the Pull Request title follow the Conventional Commits
specification.
- [x] Ensure the tests and linter pass.
- [x] 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>1 parent 57a9df3 commit bc32d7e
2 files changed
Lines changed: 86 additions & 3 deletions
File tree
- src/a2a/server/request_handlers
- tests/server/request_handlers

0 commit comments