Urgent.News

What's breaking now, across thousands of outlets.

AI

What 100% Test Coverage Missed: State Across Google ADK A2A Boundaries

I created this article for the purpose of entering the All Things Agentic Hackathon. TL;DR — An ADK output_key writes into the session of the agent that declares it. In-process that session is shared, so it looks like state flows. Across a RemoteA2aAgent hop it is the worker's session, and it never comes back. Nothing raises. Nothing warns. Every local run and every CI job exercises the working…

The article discusses an issue discovered while working on the Google ADK (Application Development Kit) for Agent-to-Agent (A2A) communication. The problem revolves around state transitions across remote A2A boundaries, which was missed by 100% test coverage. The system in question is a three-agent access-governance fleet built with Google ADK and A2A, consisting of an Orchestrator, an Access Auditor, and a model-free Escalation Agent.

Initially, the local graph passed coverage tests, but when the same graph was split across deployed A2A workers, an unexpected behavior was observed. The Auditor declared output_key, which was read back by the Orchestrator. However, the deployed Orchestrator saw an empty state key, while the local runs and tests saw a populated one. The key issue was that the output_key was written into the worker's session, which was not accessible to the caller across the A2A boundary.

The article outlines the consequences of this issue, highlighting that the deployed Orchestrator received an empty state key, leading to the rejection of a valid report. The run still reported as completed, but the silent failure went unnoticed. The article emphasizes that this type of failure is more dangerous than an obvious exception, as it can go undetected for a longer period.

The fix provided by Bastion involved treating remote session state as transport and serializing structured, validated message content. This change ensures that any failure to parse is skipped rather than guessed at, providing a sound solution. The production fix involved stopping the treatment of remote session state as transport, with the authoritative findings now crossing the boundary as structured, validated message content.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

More from Saturday 29 August →