Commit 5720d31
committed
fixup(adk): enforce empty-dict contract when parent context_id missing + annotate test helper
Addresses Copilot review feedback on kagent-dev#1927.
- _build_lineage_headers now hard-returns {} when the local session id is
unresolvable. Without this guard the function would emit a root-only
header forwarded from inbound state, contradicting the docstring
contract "no session id → no lineage headers" and matching the
existing unit-test assertion.
- _make_tool's header_provider parameter gains Callable type annotation
matching the production signature.
Signed-off-by: Lukas <1775218+Prefix@users.noreply.github.com>1 parent f4ffc6a commit 5720d31
2 files changed
Lines changed: 9 additions & 8 deletions
File tree
- python/packages/kagent-adk
- src/kagent/adk
- tests/unittests
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
288 | 291 | | |
289 | 292 | | |
290 | 293 | | |
291 | 294 | | |
292 | 295 | | |
293 | 296 | | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
300 | 301 | | |
301 | 302 | | |
302 | 303 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
0 commit comments