Skip to content

fix: Do not filter tasks in ListTasks if task state is unspecified - #622

Merged
bartek-gralewicz merged 2 commits into
mainfrom
bgralewicz/fix_unfiltered_list_tasks
Aug 6, 2026
Merged

bartek-gralewicz merged 2 commits into
mainfrom
bgralewicz/fix_unfiltered_list_tasks

Conversation

@bartek-gralewicz

Copy link
Copy Markdown
Collaborator

Description

An unfiltered ListTasks returned zero tasks on every binding.

ListTasksRequest.status is a non-optional proto enum, so a request that omits the filter deserializes to the zero value TASK_STATE_UNSPECIFIED rather than undefined. InMemoryTaskStore.list guarded on status !== undefined, so it treated "no filter" as "filter for TASK_STATE_UNSPECIFIED" and filtered every task out. totalSize is computed after filtering, so it reported 0 too.

This affected JSON-RPC, REST and gRPC alike, since the zero value is produced at the transport boundary. The SDK's own client could not list tasks against the SDK's own server: the client already omits the param when the status is TASK_STATE_UNSPECIFIED, and the server then re-materialised it as a filter.

Fixes #614 🦕

@bartek-gralewicz
bartek-gralewicz requested a review from a team as a code owner August 5, 2026 13:17
@github-actions

github-actions Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

🧪 Code Coverage

⬇️ Download Full Report

Base PR Delta
src/client/transports/grpc/grpc_transport.ts 93.18% 96.21% 🟢 +3.03%
src/client/transports/json_rpc_transport.ts 69.78% 72.2% 🟢 +2.42%
src/client/transports/rest_transport.ts 91.92% 92.47% 🟢 +0.55%
src/server/store.ts 65.93% 66.3% 🟢 +0.37%
Total 91.01% 91.19% 🟢 +0.18%

Generated by coverage-comment.yml

@bartek-gralewicz
bartek-gralewicz merged commit 1c6eb32 into main Aug 6, 2026
16 checks passed
@bartek-gralewicz
bartek-gralewicz deleted the bgralewicz/fix_unfiltered_list_tasks branch August 6, 2026 08:52
bartek-gralewicz added a commit that referenced this pull request Aug 26, 2026
🤖 I have created a release *beep* *boop*
---


## [1.1.0](v1.0.1...v1.1.0)
(2026-08-26)


### Features

* make event bus keep-alive states configurable
([#669](#669))
([f844dad](f844dad)),
closes [#620](#620)


### Bug Fixes

* Add serialization for listTasks input/output parameters.
([#610](#610))
([c863497](c863497))
* clone push notification configs before storing
([#662](#662))
([4d175a0](4d175a0))
* **compat/v0_3/translate:** add null and undefined checks to array and
string fields ([#618](#618))
([108736b](108736b))
* **deps:** replace `uuid` package with `crypto.randomUUID()`
([#665](#665))
([636b060](636b060))
* Do not filter tasks in ListTasks if task state is unspecified
([#622](#622))
([1c6eb32](1c6eb32))
* **errors:** global error branding via Symbol.hasInstance to fix
instanceof checks across bundle entry points
([#612](#612))
([cc33173](cc33173))
* **scripts:** update generate script to use buf and remove obsolete
generateTypes ([#653](#653))
([8bf3cd3](8bf3cd3))
* **server:** send full Task on every v0.3 push trigger
([#658](#658))
([b3afbe4](b3afbe4))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: bartek-gralewicz <[email protected]>
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]: Unfiltered ListTasks returns no tasks because omitted status deserializes to TASK_STATE_UNSPECIFIED

2 participants