Skip to content

fix(server): return the stored id when creating a push notification config - #1236

Open
ConnorMoss02 wants to merge 1 commit into
a2aproject:mainfrom
ConnorMoss02:fix/push-config-create-returns-id
Open

ConnorMoss02 wants to merge 1 commit into
a2aproject:mainfrom
ConnorMoss02:fix/push-config-create-returns-id

Conversation

@ConnorMoss02

@ConnorMoss02 ConnorMoss02 commented Sep 11, 2026

Copy link
Copy Markdown

Problem

on_create_task_push_notification_config returns the caller's request object rather than what the store persisted. Both stores default an empty id to the task id, but the in-memory store does it on the caller's object and the database store does it on a private copy. So on a database-backed server the create response carries no id, and reading the config back with it raises InvalidParamsError.

Fix

Normalize the id in both handlers before set_info, so the response matches what was stored on any store.

Tests

test_create_task_push_notification_config_returns_stored_id in both handler test files, parametrized over the real in-memory and database stores. The [database] case fails with the source reverted.

Fixes #1237

…onfig

Both create handlers returned the caller's request object rather than what
the store persisted. The in-memory store defaults an empty id to the task id
on the caller's object, so the id survived; the database store copies first
and defaults on its private copy, so the response carried no id and reading
the config back with it failed validation.

Normalize the id in the handler before set_info so the response matches what
was stored on every backend.
@ConnorMoss02
ConnorMoss02 requested a review from a team as a code owner September 11, 2026 00:26
@github-actions

Copy link
Copy Markdown

🧪 Code Coverage (vs main)

⬇️ Download Full Report

Base PR Delta
src/a2a/server/request_handlers/default_request_handler.py 97.90% 97.92% 🟢 +0.02%
src/a2a/server/request_handlers/default_request_handler_v2.py 92.53% 92.65% 🟢 +0.12%
Total 93.06% 93.06% 🟢 +0.01%

Generated by coverage-comment.yml

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.

Create push notification config returns no id on database-backed stores

1 participant