REST transport ignores interceptor changes to URL-bound request fields
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 55/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Java
- Estrelas
- 514
- Forks
- 200
- Merge médio
- 1d 2h
- PRs com merge (30d)
- 53
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de a2aproject/a2a-java
-
Document 1.x is the actively supported stream, and not 0.3.xTalvez já em andamento @Linux2010 assumiu há 2 dias. Aberta
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 62/100
a2aproject/a2a-java#1321 ·
Mantenedores costumam responder em até 1 dia
-
HTTP+JSON CancelTask returns 409 Conflict instead of 400 Bad Request for TaskNotCancelableErrorTalvez livre de novo @ravismash assumiu há 9 dias e não há nenhum pull request aberto. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
a2aproject/a2a-java#1298 · 5 comentários ·
Mantenedores costumam responder em até 1 dia
-
fix: handle blank push notification config id consistently across transportsTalvez já em andamento @prachisinghal-1 assumiu há 23 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
a2aproject/a2a-java#1012 · 2 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
a2aproject/a2a-java#464 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Create a sample that demonstrates how to use a shared contextId across multiple tasksTalvez livre de novo @tanish111 assumiu há 390 dias e não há nenhum pull request aberto. Abertasample
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
a2aproject/a2a-java#375 · 5 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
Todas as issues de a2aproject/a2a-java
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
apache/skywalking#14239 ·
Mantenedores costumam responder em até 1 dia
-
Re-executed query with IN condition on an index column returns deleted rows (stale IndexCursor)Talvez já em andamento @dbusche assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
h2database/h2database#4580 ·
Mantenedores costumam responder em até 1 dia
-
vips-drift
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Stirling-Tools/JPDFium#300 ·
Mantenedores costumam responder em até 1 dia
-
hermes-queue
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 85/100
chrisalunlloyd2-sudo/mindpalace#403 ·
Mantenedores costumam responder em até 1 dia
-
Guidelines: document how to build a use case against a local, unpublished Flow/browserless-test changeTalvez já em andamento @totally-not-ai assumiu hoje. Aberta
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 88/100
vaadin/use-cases#452 · 1 comentário ·
Mantenedores costumam responder em até 1 dia