Repository navigation
Commit e12d494
fix(server): include legacy task states in database list filters (#1337)
# description
`DatabaseTaskStore` can read v0.3 task rows, but its status filter
compares their JSON state only with the 1.0 protobuf enum name. A legacy
working task is readable with `GetTask` yet missing from
`ListTasks(status=WORKING)`, with an incorrect total.
Match both spellings using the existing compatibility converter. The
filter stays in SQL before counting and pagination, with owner scoping
unchanged. No schema change is needed.
The regression covers all eight concrete states, mixed modern and legacy
rows, missing legacy protocol versions, owner isolation and page tokens.
All eight SQLite cases failed before the fix.
## validation
Rebased onto main at `799fcae`. Fresh checks on that base:
- `UV_PYTHON=3.10 ./scripts/lint.sh` passed Ruff, formatting and ty.
- `UV_PYTHON=3.10 uv run pytest --timeout=45`: 2,277 passed, 199
skipped, 3 xfailed, 1 xpassed.
- `UV_PYTHON=3.10 uv run pytest --timeout=45 --cov=src
--cov-report=term-missing --cov-fail-under=88`: same test results,
93.29% coverage.
PostgreSQL/MySQL service tests skipped because their DSNs were unset.
The new regressions ran on SQLite. Existing xfail/xpass cases reference
#869.
- [x] Follow the [`CONTRIBUTING`
Guide](https://github.com/a2aproject/a2a-python/blob/main/CONTRIBUTING.md).
- [x] Make your Pull Request title in the
<https://www.conventionalcommits.org/> specification.
- [x] Ensure the tests and linter pass.
- [x] Appropriate docs were updated if necessary. No documentation
change is needed for this filter correction.
Co-authored-by: mykytanetipa <mykytanetipa@google.com>1 parent 05392b3 commit e12d494
2 files changed
Lines changed: 87 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
259 | 260 | | |
260 | 261 | | |
261 | 262 | | |
262 | | - | |
263 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
264 | 273 | | |
265 | 274 | | |
266 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
410 | 486 | | |
411 | 487 | | |
412 | 488 | | |
| |||
0 commit comments