Skip to content

fix(rest): read status=TASK_STATE_UNSPECIFIED as no filter - #483

Closed
gulldan wants to merge 1 commit into
a2aproject:mainfrom
gulldan:fix/rest-status-unspecified
Closed

gulldan wants to merge 1 commit into
a2aproject:mainfrom
gulldan:fix/rest-status-unspecified

Conversation

@gulldan

@gulldan gulldan commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #482.

Problem

The REST binding turned status=TASK_STATE_UNSPECIFIED into a filter no task can match, while JSON-RPC and gRPC read the proto default as "no filter". One ListTasks answered every task on one binding and none on another (§5.1).

Fix

handle_list_tasks maps TaskState::Unspecified to None before building the request, the same reading the other two bindings already have. Unknown values are still refused with "invalid status filter".

Tests

  • New test_list_tasks_status_unspecified_is_no_filter: after one POST /message:send, GET /tasks?status=TASK_STATE_UNSPECIFIED reports totalSize: 1. On main it reports 0.
  • CI steps on Linux, stable 1.99.1, on top of main 3f3dea6: all green (869 tests). Patch coverage as coverage.yml builds it: 26 coverable added lines, 0 missed.

Overlap

One commit on main; two lines in a2a-server/src/rest.rs. #468 (tenant paths) touches the same handler's signature, not this match; whichever lands second rebases trivially.

🤖 Generated with Claude Code

TASK_STATE_UNSPECIFIED is the proto default for an unset status, and the
JSON-RPC and gRPC bindings read it as "no filter". The REST binding
passed it on as a filter, so GET /tasks?status=TASK_STATE_UNSPECIFIED
matched no task at all while the same ListTasks over JSON-RPC returned
every task.

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
Signed-off-by: gulldan <5641375+gulldan@users.noreply.github.com>
@gulldan
gulldan requested a review from a team as a code owner November 3, 2026 19:12
@codecov

codecov Bot commented Nov 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@muscariello

Copy link
Copy Markdown
Member

Replaced by #488.

@muscariello muscariello closed this Nov 3, 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.

[Bug]: REST ListTasks treats status=TASK_STATE_UNSPECIFIED as a filter that matches nothing

2 participants