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時間
- マージ済み PR(30日)
- 53
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 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 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン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 日以内に返信