Repository navigation
fix(compat): serve DELETE for v0.3 REST push notification configs - #1442
Merged
Iwaniukooo11 merged 5 commits intoNov 13, 2026
Merged
Conversation
The v0.3 REST adapter mounted GET, POST and list routes for push
notification configs but no DELETE, although the v0.3 binding defines
`DELETE /v1/tasks/{id}/pushNotificationConfigs/{configId}` (spec section
3.5.6, and the `google.api.http` option on DeleteTaskPushNotificationConfig
in a2a_v0_3.proto). The request fell through to the v1.0 tenant mount with
tenant `v1`, so a v0.3 client got 400 VERSION_NOT_SUPPORTED while the same
call succeeded over v0.3 JSON-RPC and gRPC.
Add REST03Handler.delete_push_notification and mount it. It returns `{}`,
the JSON form of google.protobuf.Empty, like the v1.0 REST dispatcher.
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/compat/v0_3/rest_handler.py | 96.74% | 96.97% | 🟢 +0.23% |
| src/a2a/compat/v0_3/rest_transport.py | 95.71% | 95.73% | 🟢 +0.03% |
| Total | 93.57% | 93.57% | ⚪️ 0.00% |
Generated by coverage-comment.yml
Contributor
|
Ran this end to end with the real Would be nice to get the |
Iwaniukooo11
requested changes
Nov 12, 2026
CompatRestTransport.delete_task_push_notification_config raised
NotImplementedError because the server had no v0.3 route. It now sends
DELETE /v1/tasks/{id}/pushNotificationConfigs/{configId}.
Tests: the transport test checks the request instead of the error, a
route test covers 404 for an unknown task, and a client test sends the
delete through the real v0.3 REST routes.
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.
Description
REST03AdaptermountsGET/POST /v1/tasks/{id}/pushNotificationConfigsandGET /v1/tasks/{id}/pushNotificationConfigs/{push_id}, but noDELETE. The v0.3 binding definesDELETE /v1/tasks/{id}/pushNotificationConfigs/{configId}(spec section 3.5.6, and thegoogle.api.httpoption onDeleteTaskPushNotificationConfigina2a_v0_3.proto), and the v0.3 JSON-RPC and gRPC adapters already serve the call.Without the route the request falls through to the v1.0
/{tenant}mount with tenantv1, so a v0.3 client gets a 400 with reasonVERSION_NOT_SUPPORTED("A2A version '0.3' is not supported by this handler. Expected version '1.0'.").To reproduce on main: serve a
DefaultRequestHandlerthroughcreate_rest_routes(..., enable_v0_3_compat=True), create a push config over v0.3 REST, then sendDELETE /v1/tasks/{task_id}/pushNotificationConfigs/{config_id}. It returns 400. The same delete over v0.3 JSON-RPC (tasks/pushNotificationConfig/delete) and gRPC (DeleteTaskPushNotificationConfig) succeeds.This change adds
REST03Handler.delete_push_notification, which builds a v0.3DeleteTaskPushNotificationConfigRequestfrom the path and calls the v1.0 handler throughRequestHandler03, and mounts it. It returns{}, the JSON form ofgoogle.protobuf.Empty, as the v1.0 REST dispatcher does.CompatRestTransport.delete_task_push_notification_configraisedNotImplementedError, which #1424 left in place because the server had no route. It now sends the sameDELETE, so the v0.3 REST client can delete a config too (added after review).Tests:
test_delete_push_notification(handler) andtest_delete_push_notification_config_v03(route) fail on main and pass with this change. After review:test_compat_rest_transport_delete_task_push_notification_confignow checks the request the client sends instead of expectingNotImplementedError,test_compat_rest_client_deletes_push_notification_configsends the delete from the client through the real v0.3 REST routes, andtest_delete_push_notification_config_v03_unknown_task_returns_404coversTaskNotFoundError. The client tests fail with the old client code.uv run pytest tests/compat/v0_3/ -k "delete_push_notification or deletes_push_notification": 8 failed with the three compat source files from main, 8 passed with this changeuv run pytest --cov=a2a --cov-fail-under=88after merging current main: 2576 passed, 207 skipped, 4 xfailed, 1 xpassed; coverage 93.57%. In one of three runstest_scenario_auth_required_side_channel[blocking-legacy]failed and then passed on rerun; it does not touch this code.tests/integration/cross_version/client_server/test_client_server.py(againsta2a-sdk0.3.24): 4 passeduv run ruff checkanduv run ruff format --check: clean;uv run ty check: no errors (3 warnings, all in files this PR does not touch)Worth checking: v0.3 routes are registered before the
/{tenant}mount, so a v1.0 tenant literally namedv1deleting at this path now reaches the v0.3 handler. That is already true for the existing v0.3 GET on the same path. Deleting an unknown config id returns 200{}, as it does on the other transports.Fixes #1441