fix(a2a): warn when output_key cannot reach remote session - #6862
fix(a2a): warn when output_key cannot reach remote session#6862iarjunganesh wants to merge 3 commits into
Conversation
A SequentialAgent can hand an LlmAgent output to a RemoteA2aAgent while the associated output_key remains only in the caller session. Warn for that adjacent hand-off without loading the optional A2A dependency. Related to google#6854
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Hi @ALDRIN121, Thank you for putting together this PR and for the detailed description and test coverage. After reviewing the approach, we've decided not to merge this change into
Given this, we recommend closing this PR in favor of #6859. On a related note, we'd love to learn more about your use case: is there a specific reason or blocker that prevented you from using Thanks again for contributing! |
Five of seven outstanding captures were watched on the deployed fleet and retained: current-route IAM provenance and the correlated payload-free audit trail (evidence 11), the agent-mediated Model Armor refusal (evidence 12), and the connected 22-span Cloud Trace chain (evidence 13). No production code changed; the fleet is the one v0.4.0 deployed. The captures forced a documentation reconciliation. ADR-006's Model Armor and Observability rows moved from configuration proof to observed proof, backlog captures 2-5 closed, evidence 02 is superseded as current-route proof, and the two coexisting IAM binding counts are resolved as 62 current with evidence 09's 52 retained as its own dated measurement. Two claims had gone stale and are corrected rather than carried. PR google/adk-python#6862 was closed unmerged on 2026-08-24 - a maintainer confirmed the A2A session-state boundary is a general transport property being fixed centrally in #6859, which is a confirmation of the finding and a decision about where the fix belongs, not an accepted fix. And the clean-clone record cited a commit that the earlier squash had made unreachable, so it was re-run against c81b4af rather than re-pointed. Managed Gateway refusals and the timeout/retry/dead-letter sequence remain deliberately unobserved and their claims stay narrowed.
Link to Issue or Description of Change
Problem:
When an
LlmAgentwithoutput_keyimmediately precedes aRemoteA2aAgentin aSequentialAgent, the generated content crosses A2A butthe associated session-state key does not. Because the event also has content,
the state-only outbound warning proposed in #6859 does not cover this hand-off.
Solution:
Warn at
SequentialAgentconstruction for that specific adjacent ordering.The check detects an already-loaded
RemoteA2aAgentwithout importing it, soordinary
SequentialAgentusers do not acquire a dependency on the optionalA2A SDK.
Testing Plan
Unit Tests:
LlmAgent(output_key)immediately followedby
RemoteA2aAgent.output_key, and an entirely local hand-off.pytest tests/unittests/agents/test_sequential_agent.py -q(
10 passedon Python 3.12).sequential_agent.py.pyink,isort,ruff, ADK compliance checks, andcodespellpassedfor both changed files.
a2a-sdkthatimporting and constructing a local
SequentialAgentstill works.Manual End-to-End (E2E) Tests:
Not run. This change is a deterministic construction-time warning and does not
alter execution or transport behavior.
Checklist
CONTRIBUTING.mddocument.Additional context
This is intentionally separate from #6859: that PR covers state-only outbound
events and state deltas received from a remote peer. This PR covers a
caller-side
output_keyevent that also contains content, so it is neither aduplicate nor dependent on #6859.