[Bug]: CancelTaskRequest.metadata never reaches AgentExecutor.cancel
维护者通常 2 天内回复
评估
这个 Issue 还没有评估数据。
描述
What happened?
CancelTaskRequest has a metadata field (a2a_pb2.pyi; the REST mapping sends the whole request as the body, post: "/tasks/{id=*}:cancel", body: "*" in a2a.proto), but nothing on the server hands it to AgentExecutor.cancel:
RestDispatcher.on_cancel_task(src/a2a/server/routes/rest_dispatcher.py) buildsCancelTaskRequest(id=task_id)and does not read the body.- On every binding,
on_cancel_taskinDefaultRequestHandlerV2reads onlyparams.id, and theRequestContextgiven tocancelhas no request (request=Noneindefault_request_handler.py, no request inActiveTask.cancel). Socontext.metadatais{}for a cancel, while forSendMessageit returns the request's metadata.
A caller's {"metadata": {...}} therefore never reaches the executor, whichever transport it uses. The Go SDK (gRPC) and the .NET SDK (gRPC and JSON-RPC) do pass it to the executor; only their REST bindings drop it.
Expected: context.metadata of a cancel holds the request's metadata. For REST, decode the body into CancelTaskRequest and keep the id from the path.
Read from the source at 11f1116 (v1.3.0 + 12 commits); I did not run it.
Relevant log output
n/a (found by reading the source)
Code of Conduct
- I agree to follow this project's Code of Conduct
- 主要语言
- Python
- 星标
- 2.2k
- 派生
- 532
- 平均合并
- 3 天 6 小时
- 30 天内合并 PR
- 42
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
a2aproject/a2a-python 的其他 Issue
-
[Bug]: `A2A-Version` validation ignores minor versions and the query parameter可能已有人在做 @rohityan 于 71 天前认领。 未关闭component: server status:awaiting response status:stale
难度 2/5 1-3 小时 新手友好度 75/100
a2aproject/a2a-python#1204 · 4 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
[Bug]: REST task/request id sanitization可能已有人在做 @Linux2010 于 130 天前认领。 未关闭maintainers-only
难度 2/5 1-3 小时 新手友好度 65/100
a2aproject/a2a-python#805 · 1 条评论 ·
维护者通常 2 天内回复
-
[Bug]: v0.3 REST client raises NotImplementedError for list_task_push_notification_configs可能已有人在做 @RaphaelFakhri 今天认领。 未关闭component: client status:awaiting response
a2aproject/a2a-python#1423 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
[Bug]: ActiveTask.start() leaves the event queue dispatchers pending when setup fails可能已有人在做 @cchinchilla-dev 今天认领。 未关闭component: server status:awaiting response
a2aproject/a2a-python#1421 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
Compat REST client drops security from the v0.3 extended agent card可能已有人在做 @ConnorMoss02 今天认领。 未关闭component: client status:awaiting response
a2aproject/a2a-python#1418 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
查看 a2aproject/a2a-python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
FinanceFlash/unvibecode#509 ·
-
难度 1/5 1 小时以内 新手友好度 82/100
FAIRmat-NFDI/nomad-distro-dev#161 ·
-
bug v2
难度 2/5 1-3 小时 新手友好度 76/100
modelcontextprotocol/python-sdk#3821 · 1 条评论 ·
维护者通常 1 天内回复
-
bug severity:low
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
Log-odds calibration uses upper middle score instead of median for even candidate sets可能已有人在做 @flysheep-ai 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复