a2aproject / a2aproject/a2a-rs

[Bug]: Duplicate/Aggregated artifacts when using the same context id but different task ids and artifact ID's?

オープン
#161 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
75
フォーク
19
平均マージ
11時間 27分
マージ済み PR(30日)
21

説明

### What happened?

1. Start a new session (a2a-rs protocol version 0.11.0!)
2. client sends a new prompt to agent: 'yo'
3. new context id (A) and task id (T1) is created
4. agent queues artifact A1 and completes task
5. client sends a new prompt to agent: 'yo2'
6. context id A is re-used as expected. task id is new (T2)
7. agent queus artifact A2 and completes task.
8. client received task update with context id A, task id T2 and artifacts A1 AND A2

I'm not 100% sure but is (8) now a bug or is this how it's supposed to be and I'm doing something wrong? I interpreted the spec that when a new task is created it should only contain the artifacts related to the task and not the aggregate of the whole context_id. I end-up now client-side with all the duplicates.

Does anyone know? Thanks a lot.

### Relevant log output

```shell
2026-09-07T08:12:41.344030Z DEBUG a2a_protocol_server::handler::messaging: creating task task_id=ddf997f4-d94a-49e3-a425-dc26db9b9279 context_id=45e13205-3df7-4e84-ad5e-d8df06a76187
2026-09-07T08:12:41.344133Z DEBUG a2a_protocol_server::store::task_store::in_memory: saving task task_id=ddf997f4-d94a-49e3-a425-dc26db9b9279 state=Submitted
2026-09-07T08:12:41.344263Z DEBUG a2a_protocol_server::handler::messaging: executor started task_id=ddf997f4-d94a-49e3-a425-dc26db9b9279

2026-09-07T08:12:41.344313Z DEBUG coordinator::executor: context 45e13205-3df7-4e84-ad5e-d8df06a76187 task ddf997f4-d94a-49e3-a425-dc26db9b9279 : Handling request yo

2026-09-07T08:12:41.344320Z DEBUG a2a_protocol_server::store::task_store::in_memory: fetching task task_id=ddf997f4-d94a-49e3-a425-dc26db9b9279
2026-09-07T08:12:41.344384Z DEBUG a2a_protocol_server::store::task_store::in_memory: saving task task_id=ddf997f4-d94a-49e3-a425-dc26db9b9279 state=Working
2026-09-07T08:12:41.344555Z DEBUG a2a_protocol_server::store::task_store::in_memory: saving task task_id=ddf997f4-d94a-49e3-a425-dc26db9b9279 state=Working
2026-09-07T08:12:41.344578Z DEBUG a2a_protocol_server::store::task_store::in_memory: saving task task_id=ddf997f4-d94a-49e3-a425-dc26db9b9279 state=Completed

2026-09-07T08:15:41.118167Z DEBUG a2a_protocol_server::handler::messaging: creating task task_id=67a20697-583f-4212-9af5-8bb782dbd34a context_id=45e13205-3df7-4e84-ad5e-d8df06a76187
2026-09-07T08:15:41.118268Z DEBUG a2a_protocol_server::store::task_store::in_memory: saving task task_id=67a20697-583f-4212-9af5-8bb782dbd34a state=Submitted
2026-09-07T08:15:41.118492Z DEBUG a2a_protocol_server::handler::messaging: executor started task_id=67a20697-583f-4212-9af5-8bb782dbd34a

2026-09-07T08:15:41.118531Z DEBUG coordinator::executor: context 45e13205-3df7-4e84-ad5e-d8df06a76187 task 67a20697-583f-4212-9af5-8bb782dbd34a : Handling request yo2

2026-09-07T08:15:41.118530Z DEBUG a2a_protocol_server::store::task_store::in_memory: fetching task task_id=67a20697-583f-4212-9af5-8bb782dbd34a
2026-09-07T08:15:41.118593Z DEBUG a2a_protocol_server::store::task_store::in_memory: saving task task_id=67a20697-583f-4212-9af5-8bb782dbd34a state=Working
2026-09-07T08:15:41.118764Z DEBUG a2a_protocol_server::store::task_store::in_memory: applied artifact delta in place task_id=67a20697-583f-4212-9af5-8bb782dbd34a
2026-09-07T08:15:41.118812Z DEBUG a2a_protocol_server::store::task_store::in_memory: saving task task_id=67a20697-583f-4212-9af5-8bb782dbd34a state=Completed
```

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

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

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

調査の方向性

Look at the task store implementation, likely in a2a_protocol_server::store::task_store::in_memory. The logs show 'applied artifact delta in place' for the second task. Examine how artifacts are associated with tasks and contexts, and check the logic for sending task updates to the client. The fix should ensure a task update only includes artifacts created within that specific task.

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

評価

技術スタック
rust
領域
api, backend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

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

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