fix(a2a) warn when session state is dropped - #6859
Conversation
|
Thanks for addressing the runtime boundary here. I traced the converter path and I opened #6862 for the complementary caller-side construction hazard: a local One review point for this PR: It may also be useful to add a round-trip regression test that starts with an |
Hi @iarjunganesh thanks a lot for addressing the runtime boundary here. So, I traced the converter path and confirmed that the inbound warning covers a remote I opened #6862 for the complementary caller-side construction hazard: a local One review point for this PR: It may also be useful to add a round-trip regression test that starts with an ADK event containing an |
Link to Issue or Description of Change
Problem
Session state is local to each side of a
RemoteA2aAgentboundary, but state loss was silent. A caller state-only event contributes no A2A parts, so the peer receives older content. Remote state deltas are intentionally rejected because a peer must not mutate caller state, but that rejection was only debug-logged.Solution
This preserves the security boundary while making both loss directions visible.
Testing Plan
pytest tests/unittests/agents/test_remote_a2a_agent.py tests/unittests/a2a/converters/test_to_adk.py -q --disable-warnings262 passed in 2.56sBoth warning directions are covered and unsafe state mutation remains blocked.
All applicable pre-commit hooks passed.
Manual E2E
Not run against deployed A2A services. The tests exercise the exact request-history and inbound-metadata boundaries.
Checklist
Additional context
State forwarding remains out of scope because applying peer-controlled state would cross the existing trust boundary.