Skip to content

fix: honor interceptor URL fields in v0.3 REST - #1333

Merged
kabir merged 5 commits into
a2aproject:mainfrom
Linux2010:codex/fix-v03-rest-interceptor
Nov 26, 2026
Merged

kabir merged 5 commits into
a2aproject:mainfrom
Linux2010:codex/fix-v03-rest-interceptor

Conversation

@Linux2010

@Linux2010 Linux2010 commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The v0.3 REST transport invokes interceptors, but constructs task and push-config URLs from the original parameters. A request whose intercepted task ID was changed still went to the original task.

Build those paths from the returned protobuf builder or message; reject null payloads for request-bearing operations before sending HTTP. Forward pagination fields set on an intercepted list request. The list request's parent is now tasks/{id}, matching the proto rather than including the collection suffix.

The existing list API returns only the current list, not a continuation token; interceptors setting pagination should account for that limitation. This PR addresses interceptor-derived URL fields; it does not change the existing create-config HTTP body representation or add general resource-ID path encoding.

Validation

  • Confirmed the GetTask HTTP regression failed before the fix.
  • mvn -q -pl compat-0.3/client/transport/rest -am clean test (735 reactor tests passed).
  • MockServer regressions exercise GetTask, cancel, subscribe and push-config operations, builder and immutable payloads, null payload rejection, null headers and list pagination. The extended Agent Card operation uses the non-null request payload required by the shared interceptor validation.
  • git diff --check.

@ehsavoie ehsavoie left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to disagree with the original as default in case of null. We shouldn't allow for a null payload.
Also I'm not a big fan of var :)

@ehsavoie ehsavoie left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I meant about the null part: #1347
Could you please stack your PRs / commits when you are addressing the same issue across versions / transports ? For example the code to extract the payload could be shared

@Linux2010
Linux2010 force-pushed the codex/fix-v03-rest-interceptor branch from c094720 to 096b634 Compare November 23, 2026 22:57
@Linux2010
Linux2010 force-pushed the codex/fix-v03-rest-interceptor branch from 096b634 to 1e9e902 Compare November 24, 2026 22:56
@kabir
kabir merged commit 242e738 into a2aproject:main Nov 26, 2026
15 checks passed
Linux2010 added a commit to Linux2010/a2a-java that referenced this pull request Nov 27, 2026
Linux2010 added a commit to Linux2010/a2a-java that referenced this pull request Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants