Repository navigation
fix(rest): format single-digit history length query - #1200
Conversation
kabir
left a comment
There was a problem hiding this comment.
Thanks for the fix @014-code ! The change looks good, and the updated test catches the single-digit case nicely.
Could you also apply the same fix and regression test to RestTransport_v0_3? Its getTask method still uses %2d, so history lengths of 1–9 fail there too. Since #1197 covers both protocol versions, that would fully address the issue.
Apply the same single-digit formatting fix to RestTransport_v0_3, whose getTask still used %2d and padded single-digit history lengths with a leading space, producing an invalid query parameter such as historyLength= 5. Add a regression test using a single-digit history length. This fixes a2aproject#1197
91ce7a3 to
c0fc2e1
Compare
|
Thanks @kabir! Applied the same fix to url = agentUrl + String.format("/v1/tasks/%s?historyLength=%d", taskQueryParams.id(), taskQueryParams.historyLength());Added the matching regression test in Validation:
Also rebased the branch onto current |
kabir
left a comment
There was a problem hiding this comment.
The v0.3 transport now uses unpadded decimal formatting for historyLength, and its regression test checks the single-digit query parameter. The v1 path and test cover the same case. The diff addresses the outstanding feedback; CI checks are passing.
|
THanks @014-code ! |
What
Fix REST
getTaskURL formatting for single-digithistoryLengthvalues.Why
The
%2dformat specifier pads single-digit values with a leading space, producing an invalid query parameter such ashistoryLength= 5.Validation
RestTransportTest: 12 tests passedFixes #1197