a2aproject / a2aproject/a2a-python

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

オープン 初心者向け
#1,237 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
2.1k
フォーク
496
平均マージ
4日 17時間
マージ済み PR(30日)
12

説明

## What happens

Creating a push notification config against a database-backed server returns a config with no `id`. Reading it back with that id raises `InvalidParamsError`.

```
create returned id = ''
get FAILED -> InvalidParamsError: Validation failed
```

The same calls against the in-memory store return `id='task-123'` and the get succeeds.

## Why

`on_create_task_push_notification_config` returns the caller's request object rather than what the store persisted (`default_request_handler.py:556`, `default_request_handler_v2.py:394`).

Both stores default an empty `id` to the task id, on different objects:

- `inmemory_push_notification_config_store.py:51` sets it on the caller's object, so `return params` carries it.
- `database_push_notification_config_store.py:292` copies first and sets it on the copy, so `params` never gets it.

The store holds the right id either way; only the response differs.

## Version

main @ d55a3d3

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

The issue is in `default_request_handler.py` line 556 and `default_request_handler_v2.py` line 394, where `on_create_task_push_notification_config` returns the request `params` instead of the persisted object. Compare with `inmemory_push_notification_config_store.py:51` and `database_push_notification_config_store.py:292` to see how each store handles the `id`. Write a test that creates a push notification config using the database store and verifies the returned config has a valid `id`. Run the existing push notification tests to ensure the fix doesn't break anything.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
backend, databases
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
75/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。