a2aproject / a2aproject/a2a-python

[Bug]: `A2A-Version` validation ignores minor versions and the query parameter

Đang mở
#1,204 2 bình luận 0 reaction 1 người được giao Được @rohityan nhận Xem trên GitHub
component: server status:awaiting response status:stale
Ngôn ngữ chính
Python
Star
2.1k
Fork
496
Merge trung bình
4 ngày 17 giờ
Pull request đã merge (30 ngày)
12

Mô tả

### What happened?

The specification says:

> “Agents MUST process requests using the semantics of the requested `A2A-Version` (matching `Major.Minor`).”

and

> “Clients MAY provide the `A2A-Version` as a request parameter instead of a header.”

The implementation seems to miss both points.

1. The code compares only `major`:

```python
return actual_v.major == expected_v.major
```

2. The query parameter is ignored.

```python
actual_version = headers.get(
constants.VERSION_HEADER
) or headers.get(constants.VERSION_HEADER.lower())

if not actual_version:
return constants.PROTOCOL_VERSION_0_3

return str(actual_version)
```

A similar issue existed: https://github.com/a2aproject/a2a-python/issues/856 but it was not *fully* fixed.

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.