Repository navigation
fix(server): allow recovery after status event validation fails - #1365
Merged
Iwaniukooo11 merged 5 commits intoOct 26, 2026
Merged
Conversation
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/server/tasks/task_updater.py | 94.83% | 98.31% | 🟢 +3.48% |
| Total | 93.01% | 93.03% | 🟢 +0.02% |
Generated by coverage-comment.yml
Iwaniukooo11
requested changes
Oct 23, 2026
Iwaniukooo11
pushed a commit
that referenced
this pull request
Oct 27, 2026
🤖 I have created a release *beep* *boop* --- ## [1.3.0](v1.2.3...v1.3.0) (2026-10-27) ### Features * **server:** release parked interrupted tasks after a configurable timeout ([#1338](#1338)) ([b22a68d](b22a68d)) ### Bug Fixes * **client:** Create separate httpx per client when none configured ([#1358](#1358)) ([d316d0e](d316d0e)) * **client:** raise A2A errors for malformed JSON-RPC responses ([#1375](#1375)) ([7e55413](7e55413)) * **client:** rejections from unrecognized fields ([#1354](#1354)) ([91929cd](91929cd)) * **compat:** keep an unset v0.3 status message and provider as None ([#1362](#1362)) ([cdb4799](cdb4799)), closes [#1361](#1361) * **compat:** return A2A error codes from the v0.3 JSON-RPC adapter ([#1369](#1369)) ([8e32d53](8e32d53)) * **compat:** set last_updated when storing a task in v0.3 format ([#1372](#1372)) ([30b6d50](30b6d50)), closes [#1371](#1371) * **core:** restore structured __repr__ on A2A exceptions ([#1348](#1348)) ([79a6f45](79a6f45)) * **server:** allow recovery after status event validation fails ([#1365](#1365)) ([ca3ef0d](ca3ef0d)) * **server:** apply history_length to legacy streaming sends ([#1364](#1364)) ([261c074](261c074)) * **server:** include legacy task states in database list filters ([#1337](#1337)) ([e12d494](e12d494)) * **server:** record executor failures through the event consumer ([#1366](#1366)) ([ad85806](ad85806)) * **server:** reject boolean JSON-RPC request IDs ([#1350](#1350)) ([05392b3](05392b3)) * skip malformed agent card signature headers ([#1335](#1335)) ([b21a144](b21a144)) ### Documentation * **helpers:** note that whole numbers in a data Part come back as floats ([#1373](#1373)) ([654774f](654774f)) ### Miscellaneous Chores * release 1.3.0 ([#1389](#1389)) ([fb6373f](fb6373f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: mykytanetipa <mykytanetipa@google.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
TaskUpdater.update_status()sets the terminal flag before constructing the status event. An invalid timestamp, message, or metadata can then raise an exception before anything reaches the queue.For example, after a
COMPLETEDupdate with an invalid timestamp, callingfailed()to report the error raises aRuntimeErrorsaying the task is already terminal. The updater never published the completion event.Fix
Construct the complete
TaskStatusUpdateEventbefore setting the terminal flag, so a construction error leaves the updater able to report a failure. The flag is still set under the existing lock, before enqueueing.Tests
DefaultRequestHandlerV2returns and stores aFAILEDtask after the agent catches a status validation error.Local validation on Python 3.10:
./scripts/lint.shpasses (Ruff, formatting, and ty).UV_OFFLINE=1 uv run pytest --cov=a2a --cov-report=term --cov-fail-under=88: 2,312 passed, 183 skipped, 3 xfailed, 1 xpassed, with 92.95% coverage.The 183 skips are 182 PostgreSQL/MySQL tests without configured test databases and one SQLite row-lock test. The existing xfail/xpass cases reference #869. The first online runs hit the cross-version fixture's three-second startup timeout while uv downloaded or resolved legacy SDK dependencies; the full run passes with those dependencies cached and offline mode enabled.
GitHub CI for the updated commit is pending.