From 2919258aaa510437820e1d24f07b99c54f84aca0 Mon Sep 17 00:00:00 2001 From: Daria Wieliczko Date: Fri, 17 Apr 2026 18:16:50 +0000 Subject: [PATCH] fix(tck): resolve capability test failures for extensions and push notifications - Default `extensions` to an empty list in `AgentCapabilities` to ensure it serializes as an array, fixing `test_capabilities_structure`. - Save `pushNotificationConfig` in `onMessageSend` for non-streaming messages, fixing `test_send_message_with_push_notification_config` --- .../server/requesthandlers/DefaultRequestHandler.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/server-common/src/main/java/io/a2a/server/requesthandlers/DefaultRequestHandler.java b/server-common/src/main/java/io/a2a/server/requesthandlers/DefaultRequestHandler.java index 577e571c9..6c01c04f0 100644 --- a/server-common/src/main/java/io/a2a/server/requesthandlers/DefaultRequestHandler.java +++ b/server-common/src/main/java/io/a2a/server/requesthandlers/DefaultRequestHandler.java @@ -326,8 +326,13 @@ public EventKind onMessageSend(MessageSendParams params, ServerCallContext conte } } } - if (kind instanceof Task taskResult && !taskId.equals(taskResult.getId())) { - throw new InternalError("Task ID mismatch in agent response"); + if (kind instanceof Task taskResult) { + if (shouldAddPushInfo(params)) { + pushConfigStore.setInfo(taskResult.getId(), params.configuration().pushNotificationConfig()); + } + if (!Objects.equals(taskId, taskResult.getId())) { + throw new InternalError("Task ID mismatch in agent response"); + } } // Send push notification after initial return (for both blocking and non-blocking)