REST transport ignores interceptor changes to URL-bound request fields
维护者通常 1 天内回复
评估
调研方向
Start in RestTransport.getTask, where the protobuf builder is intercepted but the URL is built from taskQueryParams instead of the intercepted payload. Run the JUnit HTTP-server regression, which expects GET /tasks/changed and currently gets /tasks/original. Then check the other operations that put IDs or filters into the URL. Done means the URL follows the post-interceptor payload for GetTask and the other affected operations, with the regression passing.
由索引模型根据 Issue 内容生成。
描述
What happened?
The ClientCallInterceptor.intercept contract permits returning a modified payload, but the HTTP+JSON RestTransport builds resource paths and query strings from the original method arguments rather than the post-interceptor payload. An interceptor can therefore change the task ID in the payload and still send the request to the original task.
On main 897835ef664fb5c9fc4e1f5388e88a49c93e743c, a GetTask interceptor like the following receives the protobuf request builder:
@Override
public PayloadAndHeaders intercept(String method, Object payload,
Map<String, String> headers, AgentCard card, ClientCallContext context) {
((org.a2aproject.sdk.grpc.GetTaskRequest.Builder) payload).setId("changed");
return new PayloadAndHeaders(payload, headers);
}
Call getTask(new TaskQueryParams("original"), null) with this interceptor and capture the request using a local HTTP server. Expected: GET /tasks/changed. Actual: GET /tasks/original, despite the interceptor returning the modified builder. A JUnit HTTP-server regression reproduces this as expected: </tasks/changed> but was: </tasks/original>.
RestTransport.getTask creates and intercepts a protobuf builder, but constructs the URL using taskQueryParams. Other operations that encode IDs or filters into their URL also appear to construct those from the original arguments; each should be checked rather than assuming only GetTask is affected. This can matter for interceptors that rewrite a target or apply a filter, not just logging.
For context, #1327 adds fields to the GetTask payload visible to interceptors but does not make modified fields drive the URL. I have not checked every operation's replacement-payload semantics; this report's demonstrated case is a mutation of the supplied builder.
Code of Conduct
- I agree to follow this project's Code of Conduct
- 主要语言
- Java
- 星标
- 514
- 派生
- 200
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 53
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
a2aproject/a2a-java 的其他 Issue
-
Document 1.x is the actively supported stream, and not 0.3.x可能已有人在做 @Linux2010 于 2 天前认领。 未关闭
难度 1/5 1-3 小时 新手友好度 62/100
a2aproject/a2a-java#1321 ·
维护者通常 1 天内回复
-
HTTP+JSON CancelTask returns 409 Conflict instead of 400 Bad Request for TaskNotCancelableError可能重新可做 @ravismash 于 9 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
a2aproject/a2a-java#1298 · 5 条评论 ·
维护者通常 1 天内回复
-
fix: handle blank push notification config id consistently across transports可能已有人在做 @prachisinghal-1 于 23 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
a2aproject/a2a-java#1012 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
a2aproject/a2a-java#464 · 1 条评论 ·
维护者通常 1 天内回复
-
Create a sample that demonstrates how to use a shared contextId across multiple tasks可能重新可做 @tanish111 于 390 天前认领,目前没有进行中的 PR。 未关闭sample
难度 2/5 1-3 小时 新手友好度 70/100
a2aproject/a2a-java#375 · 5 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 a2aproject/a2a-java 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
apache/skywalking#14239 ·
维护者通常 1 天内回复
-
Re-executed query with IN condition on an index column returns deleted rows (stale IndexCursor)可能已有人在做 @dbusche 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
h2database/h2database#4580 ·
维护者通常 1 天内回复
-
vips-drift
难度 2/5 1-3 小时 新手友好度 74/100
Stirling-Tools/JPDFium#300 ·
维护者通常 1 天内回复
-
hermes-queue
难度 1/5 1-3 小时 新手友好度 85/100
chrisalunlloyd2-sudo/mindpalace#403 ·
维护者通常 1 天内回复
-
Guidelines: document how to build a use case against a local, unpublished Flow/browserless-test change可能已有人在做 @totally-not-ai 今天认领。 未关闭
难度 1/5 1-3 小时 新手友好度 88/100
vaadin/use-cases#452 · 1 条评论 ·
维护者通常 1 天内回复