Repository navigation
Commit 21fe836
fix(compat): treat an unset v0.3 history_length as unlimited (a2aproject#1306)
## Problem
`FromProto.message_send_configuration` passed the v0.3 `history_length`
default of 0 through as a limit, so v0.3 gRPC and REST `SendMessage`
returned tasks with empty history. The v0.3 proto defines 0 as
unlimited.
## Fix
Map 0 to `None`, as `task_query_params` already does for GetTask.
Follow-up to a2aproject#1277 in the same file.
## Tests
`test_message_send_configuration_history_length` in
`test_proto_utils.py`. The three `test_grpc_handler.py` cases that
expected `history_length=0` on the forwarded request now expect it
unset.
Fixes a2aproject#1305
Co-authored-by: mykytanetipa <mykytanetipa@google.com>1 parent 6ff0a82 commit 21fe836
3 files changed
Lines changed: 18 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
793 | 793 | | |
794 | 794 | | |
795 | 795 | | |
796 | | - | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
797 | 799 | | |
798 | 800 | | |
799 | 801 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
83 | | - | |
| 81 | + | |
84 | 82 | | |
85 | 83 | | |
86 | 84 | | |
| |||
115 | 113 | | |
116 | 114 | | |
117 | 115 | | |
118 | | - | |
119 | | - | |
120 | | - | |
| 116 | + | |
121 | 117 | | |
122 | 118 | | |
123 | 119 | | |
| |||
168 | 164 | | |
169 | 165 | | |
170 | 166 | | |
171 | | - | |
172 | | - | |
173 | | - | |
| 167 | + | |
174 | 168 | | |
175 | 169 | | |
176 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
266 | 278 | | |
267 | 279 | | |
268 | 280 | | |
| |||
0 commit comments