a2aproject / a2aproject/a2a-tck

TCK mandatory tests: 12 ListTasks tests fail because ListTasksResponse requires pagination fields missing from v1.0 SDK

未關閉
#141 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
50
分支
40
平均合併
7 天 1 小時
30 天內合併 PR
1

描述

## Problem

All 12 TCK mandatory ListTasks tests fail against the v1.0 Python SDK because `ListTasksResponse` is missing required pagination fields.

The tests in `tests/mandatory/protocol/test_tasks_list_method.py` assert:
```python
assert 'totalSize' in result
assert 'pageSize' in result
assert 'nextPageToken' in result
```

But the v1.0 Python SDK (`InMemoryTaskStore`) returns only:
```json
{"result": {"tasks": [...]}}
```

## Spec Reference

A2A v1.0 `ListTasksResponse` message (a2a.proto):
```proto
message ListTasksResponse {
repeated Task tasks = 1 [(google.api.field_behavior) = REQUIRED];
string next_page_token = 2 [(google.api.field_behavior) = REQUIRED];
int32 page_size = 3 [(google.api.field_behavior) = REQUIRED];
int32 total_size = 4 [(google.api.field_behavior) = REQUIRED];
}
```

All four fields are REQUIRED.

## Reproduction

```bash
# Start any v1.0 SDK agent
curl -X POST http://localhost:9998 -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"ListTasks","params":{},"id":"1"}'

# Returns:
# {"result": {"tasks": []}}

# Expected per spec:
# {"result": {"tasks": [], "totalSize": 0, "pageSize": 50, "nextPageToken": ""}}
```

## Affected Tests (12)

- TestBasicListing: test_list_all_tasks, test_list_tasks_empty_when_none_exist, test_list_tasks_validates_required_fields, test_list_tasks_sorted_by_timestamp_descending
- TestFiltering: test_filter_by_context_id, test_filter_by_status, test_filter_by_last_updated_after, test_combined_filters
- TestPagination: test_default_page_size, test_custom_page_size, test_page_token_navigation, test_last_page_detection, test_total_size_accuracy
- TestHistoryLimiting: test_history_length_zero, test_history_length_custom, test_history_length_exceeds_actual
- TestArtifactInclusion: test_artifacts_excluded_by_default, test_artifacts_included_when_requested
- TestEdgeCasesAndErrors: test_default_page_size_is_50, etc.

## Impact

Since these are marked MANDATORY, every v1.0 Python SDK implementation will appear non-compliant. This affects:
- The built-in `python-sut/tck_core_agent`
- Any agent using `InMemoryTaskStore`
- The TCK itself if run against its own reference SUT

## Options

1. Fix `InMemoryTaskStore.list_tasks()` in a2aproject/a2a-python to return pagination fields (preferred)
2. Add a note to TCK that `ListTasks` pagination requires a custom TaskStore implementation
3. Downgrade from MANDATORY to RECOMMENDED until the SDK supports it

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。