Repository navigation
Description
We are a research team at MPI-SWS building Daavar, a conformance checker for distributed protocol implementations: it explores every message interleaving of a program written against our message-passing API and compares the behaviours of an implementation with those of a specification program, or of two implementations with each other. We ran it on the A2A specification text and on a2a-java and a2a-rs; this issue is one of the results, with the evidence and the reproduction below.
What happened?
Spec §3.1.2: "If the agent returns a Task, the stream MUST begin with the Task object". DefaultRequestHandler.onMessageSendStream relays whatever the executor emits first, so with the documented pattern (emitter.submit(); emitter.startWork();) the stream begins with a TaskStatusUpdateEvent and no Task is ever sent. onSubscribeToTask already prepends the stored task, citing §3.1.6.
To reproduce. An AgentExecutor whose execute calls emitter.startWork() then emitter.complete(); a streaming message that creates a new task. Stream: [TaskStatusUpdateEvent(WORKING), TaskStatusUpdateEvent(COMPLETED)]. Expected: the Task first. A continuation turn behaves the same.
The ACTS suite does not catch this: its streaming tests check event counts, monotonic states and the final event (STREAM-SSE-001), and the first event of a subscribe (STREAM-SSE-004, which also accepts a status update there). We are proposing a must test for the corpus.
Counts are uncovered words / all words of the checked side; a word is one distinct observation of the client and server roles (server-executor messages included) within a sequential model of each server core and a fixed scenario. Over 14 scenarios (one server, with and without a second cancel; a two-server delegation in six variants, A answering locally or B answering in one of five ways; the same delegation gated), 97 words of the a2a-java model are rejected, every one a stream that begins with a status update and contains no Task (one server: 11 of 18). Model results: a2a-java model of f40664f (equivalent under the model's abstraction to 586fdd5; later changes on main not rechecked), a2a-rs model of 700a6a2. A PR follows.
Source lines and consequences
- At
f40664f: the streaming send only relays (DefaultRequestHandler.java L1072-L1099); subscribe prepends (L1277-L1288);submit()/startWork()enqueue status updates (AgentEmitter.java L125-L147; example in AgentExecutor.java L59-L64). - At
586fdd5(DefaultRequestHandlerandMainEventBusProcessorunchanged throughmain9c7eabf):onMessageSendStream(L1037) adds no item; fix(itk): Fixing ITK issues #1344 replaces only aTaskevent with its snapshot (MainEventBusProcessor.java L268). - By code inspection, not run: a2a-python's server rejects a status before the Task for new tasks (
active_task.py:348-360at12b7847f), so an a2a-python agent forwarding an a2a-java stream fails on the first item. - If the maintainers hold that the MUST binds the executor, the fix belongs in
AgentExecutor's documentation instead.
Reproduce
Full evidence: benchmarks/a2a-task at tag a2a-fixes-2026-11-21.
git clone --recurse-submodules https://github.com/joulook/daavar.git && cd daavar
git checkout a2a-fixes-2026-11-21 && git submodule update --init --recursive
(cd traceforge && cargo build --release -p traceforge --bin conf-join)
cd benchmarks/a2a-task/rust && cargo build --release
B=target/release/tf_a2a_task; J=../../../traceforge/target/release/conf-join
(cd ../../../jmc && ./gradlew -q --no-daemon --init-script ../scripts/print-classpath.gradle :core:printTestClasspath)
CP=$(cat ../../../jmc/cp.txt); mkdir -p classes report && javac -d classes -cp "$CP" ../java/bench/a2a_task/*.java
$B export spec --out spec.jsonl --model fifo -- spec,n
java -Xss4m -cp "classes:$CP" org.mpi_sws.jmc.mp.launch.MpLauncher bench.a2a_task.A2ATask:impl,n must 0 1 "$PWD/report" "$PWD/java.jsonl" 3600
$J --decide spec.jsonl java.jsonl # 11 of 18 uncoveredThe join's uncovered line is the figure quoted above. With the driver at the same tag: bin/daavar check benchmarks/a2a-task --scenario one --cell n --directions 'java<=spec'.
Relevant log output
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Activity
fix(server-common): begin message/stream with the Task object