{{ message }}
Repository navigation
Commit 5156deb
committed
fix: return TaskNotFoundError when SendMessage references non-existent taskId
Per A2A spec section 3.4.2, when a client includes a taskId in a Message,
it MUST reference an existing task. Previously, the SDK silently created a
new task using the client-provided taskId, which the spec explicitly
forbids.
Applies to all three transports (JSON-RPC, gRPC, HTTP+JSON) via the common
DefaultRequestHandler.initMessageSend() code path.
Existing tests that relied on the buggy behaviour have been updated to
either pre-populate the task store (when testing follow-up messages) or
omit the client-provided taskId on the initial message (letting the
server generate it, matching the spec-correct flow).
This fixes #7661 parent 98d2bdb commit 5156deb
10 files changed
Lines changed: 438 additions & 258 deletions
File tree
- extras
- push-notification-config-store-database-jpa/src/test/java/org/a2aproject/sdk/extras/pushnotificationconfigstore/database/jpa
- queue-manager-replicated
- tests-multi-instance/tests/src/test/java/org/a2aproject/sdk/extras/queuemanager/replicated/tests/multiinstance
- tests-single-instance/src/test/java/org/a2aproject/sdk/extras/queuemanager/replicated/tests
- task-store-database-jpa/src/test/java/org/a2aproject/sdk/extras/taskstore/database/jpa
- server-common/src
- main/java/org/a2aproject/sdk/server/requesthandlers
- test/java/org/a2aproject/sdk/server/requesthandlers
- tests/server-common/src/test/java/org/a2aproject/sdk/server/apps/common
- transport
- grpc/src/test/java/org/a2aproject/sdk/transport/grpc/handler
- jsonrpc/src/test/java/org/a2aproject/sdk/transport/jsonrpc/handler
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| |||
254 | 257 | | |
255 | 258 | | |
256 | 259 | | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
261 | 264 | | |
262 | | - | |
| 265 | + | |
263 | 266 | | |
264 | | - | |
265 | | - | |
266 | 267 | | |
267 | 268 | | |
268 | 269 | | |
| |||
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
275 | | - | |
276 | 276 | | |
277 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
278 | 286 | | |
279 | | - | |
280 | | - | |
| 287 | + | |
281 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
282 | 292 | | |
283 | 293 | | |
284 | 294 | | |
| |||
297 | 307 | | |
298 | 308 | | |
299 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
300 | 313 | | |
301 | 314 | | |
302 | 315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | 133 | | |
137 | 134 | | |
138 | 135 | | |
139 | | - | |
| 136 | + | |
140 | 137 | | |
141 | 138 | | |
142 | 139 | | |
143 | | - | |
144 | 140 | | |
145 | | - | |
146 | 141 | | |
147 | 142 | | |
148 | 143 | | |
| |||
166 | 161 | | |
167 | 162 | | |
168 | 163 | | |
169 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
170 | 167 | | |
171 | 168 | | |
172 | 169 | | |
| |||
193 | 190 | | |
194 | 191 | | |
195 | 192 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | 193 | | |
200 | 194 | | |
201 | 195 | | |
202 | | - | |
| 196 | + | |
203 | 197 | | |
204 | 198 | | |
205 | 199 | | |
206 | | - | |
207 | 200 | | |
208 | | - | |
209 | 201 | | |
210 | 202 | | |
211 | 203 | | |
| |||
223 | 215 | | |
224 | 216 | | |
225 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
226 | 221 | | |
227 | 222 | | |
228 | 223 | | |
| |||
312 | 307 | | |
313 | 308 | | |
314 | 309 | | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | 310 | | |
319 | 311 | | |
320 | 312 | | |
321 | | - | |
| 313 | + | |
322 | 314 | | |
323 | 315 | | |
324 | 316 | | |
325 | 317 | | |
326 | | - | |
327 | 318 | | |
328 | | - | |
329 | 319 | | |
330 | 320 | | |
331 | 321 | | |
| |||
348 | 338 | | |
349 | 339 | | |
350 | 340 | | |
351 | | - | |
| 341 | + | |
352 | 342 | | |
353 | 343 | | |
354 | 344 | | |
| |||
408 | 398 | | |
409 | 399 | | |
410 | 400 | | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | 401 | | |
415 | 402 | | |
416 | 403 | | |
417 | | - | |
| 404 | + | |
418 | 405 | | |
419 | 406 | | |
420 | 407 | | |
421 | | - | |
422 | 408 | | |
423 | | - | |
424 | 409 | | |
425 | 410 | | |
426 | 411 | | |
| |||
439 | 424 | | |
440 | 425 | | |
441 | 426 | | |
| 427 | + | |
| 428 | + | |
442 | 429 | | |
443 | 430 | | |
444 | 431 | | |
| |||

0 commit comments