[Bug]: REST client drops task cutoff and push-config pagination parameters · Issue #1233 · a2aproject/a2a-java · GitHub
Skip to content

[Bug]: REST client drops task cutoff and push-config pagination parameters #1233

Open

Description

@hutiefang76

What happened?

The REST client drops optional query parameters that the server already supports. Reproduced on main at 86a0eb3c601aaa143b389b117f87f69df982ad4a.

For listTasks, setting statusTimestampAfter does not put the cutoff in the request:

ListTasksParams params = ListTasksParams.builder()
        .statusTimestampAfter(Instant.parse("2024-01-01T00:00:00Z"))
        .build();
transport.listTasks(params, null);

Expected /tasks?statusTimestampAfter=2024-01-01T00%3A00%3A00Z; the recorded request has no statusTimestampAfter. The gRPC/JSON-RPC mappings and REST server handler already handle the field.

The same omission affects listTaskPushNotificationConfigurations: pageSize and pageToken never reach /tasks/{taskId}/pushNotificationConfigs. The server consumes them and returns nextPageToken, but the client cannot request that next page.

I added request-recording cases to the existing RestTransportTest and ran them on JDK 17 in an isolated Maven container. Both omission checks fail on main; the control with no optional parameters passes (3 tests, 2 failures, 0 errors/skips).

I can fix these two REST query-building paths and cover the timestamp, opaque page tokens and unset-parameter behavior without changing public APIs. Please assign this scope to me if that works for the project.

Relevant log output

Tests run: 3, Failures: 2, Errors: 0, Skipped: 0
listTasks must send the documented statusTimestampAfter query parameter
listTaskPushNotificationConfigurations: expected pageSize <1> but was <>

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Reproduction and report prepared and posted by an AI assistant for @hutiefang76.

Activity

  1. sumitvairagar commented on Oct 20, 2026

    @sumitvairagar

    Hi @kabir @ehsavoie 👋

    I'd like to fix this. I've read through the code and can confirm both omissions.

    Bug 1 — listTasks / statusTimestampAfter
    buildListTasksQueryString() handles every field in ListTasksParams except statusTimestampAfter. It was likely added to the record later and the query builder wasn't updated. Fix: one if block adding statusTimestampAfter=<ISO-8601> to the query string with URL encoding.

    Bug 2 — listTaskPushNotificationConfigurations / pageSize + pageToken
    The URL is built as a plain string with no query parameters at all — pageSize and pageToken are never appended despite the server supporting both. Fix: build a query string the same way listTasks does and append it.

    No public API changes in either fix. I'll add failing regression tests first, then the production fix. Happy to proceed if this scope works for the project.

  2. sumitvairagar commented on Oct 21, 2026

    @sumitvairagar

    PR #1239 is up: #1239

    Fixed both bugs — failing tests first confirm the behaviour, then the production fix. Happy to adjust anything on review.

  3. added 2 commits that reference this issue on Oct 21, 2026
    e95a10a
    2eac4ba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions