Repository navigation
fix(rest): forward pageSize and pageToken for push-notification config listing - #701
Merged
JakubWorek merged 3 commits intoOct 9, 2026
Merged
Conversation
…g listing The REST transport dropped `pageSize`/`pageToken` when listing a task's push-notification configs — the client sent no query string, and the Express handler always invoked the request handler with `pageSize: 0`, `pageToken: ''` regardless of the URL's query parameters. Pagination worked on JSON-RPC and gRPC but silently no-op'd on REST, and there was no way to request a bounded page or follow a returned nextPageToken. Client (`RestTransport.listTaskPushNotificationConfig`): append `pageSize`/`pageToken` as camelCase query params, mirroring `listTasks` and A2A spec §11.5. `pageSize` has no proto3 `optional` modifier, so 0 is its "unspecified" value — only send it when > 0. Server (`RestTransportHandler.listTaskPushNotificationConfigs`): take a `queryParams` object like `listTasks` already does and parse `pageSize`/`pageToken`/`tenant` from it instead of hard-coding them. Closes a2aproject#700
🧪 Code Coverage
Generated by coverage-comment.yml |
JakubWorek
reviewed
Oct 9, 2026
JakubWorek
left a comment
Member
There was a problem hiding this comment.
Thanks for submitting the PR, pls add pageSize validation in rest_transport_handler
…isting Number() let abc (NaN), -5 and 1.5 through to the request handler. Validate it as a non-negative integer, like the other pagination parameters.
Contributor
Author
|
Thanks for the review. I added the validation in 00cd6cf: pageSize on the push-notification config list now goes through a non-negative integer check, so abc, -5 and 1.5 are rejected with a RequestMalformedError instead of reaching the request handler. An absent or empty pageSize still means 0 (server default). Tests cover the rejected values and the empty case, and I merged main into the branch too. |
JakubWorek
approved these changes
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The REST transport silently drops
pageSizeandpageTokenwhen listing a task's push-notification configs:RestTransport.listTaskPushNotificationConfigsendsGET /tasks/:taskId/pushNotificationConfigswith no query string, even whenpageSize/pageTokenare supplied.restHandleralways invokes the request handler withpageSize: 0,pageToken: ''regardless of the request's query parameters.Pagination works on the JSON-RPC and gRPC transports, so REST behaved inconsistently — and there was no way to request a bounded page or follow a returned
nextPageToken. Per A2A spec §11.5, GET request parameters must be sent as camelCase query parameters (pageSize,pageToken).Changes
RestTransport.listTaskPushNotificationConfig): appendpageSize/pageTokenas query params, mirroring the existinglistTasksimplementation.ListTaskPushNotificationConfigsRequest.pageSizehas no proto3optionalmodifier (unlikeListTasksRequest.pageSize), so0is its unspecified value — only sent when> 0.RestTransportHandler.listTaskPushNotificationConfigs): take aqueryParamsobject likelistTasksalready does, and parsepageSize/pageToken/tenantfrom it instead of hard-coding.The v0.3 compat REST layer is intentionally left alone — its wire response is a bare array with no pagination fields.
Testing
pageSize/pageToken/tenant; the Express route passes them through end to end.npx vitest run— 68 files / 1529 tests pass.npx tsc --noEmit+-p tsconfig.test.json,npx eslint .,npm run build— all clean.Closes #700