Expand description
A conformance harness for AgentExecutor
implementations.
The TCK grades servers. Nothing graded the thing an adopter actually writes. The paths they get wrong are the awkward ones — cancellation arriving mid-work, a parked task reported as an error, an event emitted after a terminal state — and those are exactly the cases people skip when writing tests by hand.
This drives an executor directly against a real event queue: no server, no ports, no model. It grades protocol invariants, the ones that hold for any agent whatever it does, and deliberately says nothing about whether the agent is any good at its job.
#[tokio::test]
async fn my_executor_is_conformant() {
let report = a2a_protocol_server::conformance::check(Arc::new(MyExecutor)).await;
report.assert_pass();
}§How it grades
Three outcomes, and the middle one is the one that keeps the score
honest. A check that did not apply — because the executor never did the
thing it is about — is not graded, and a report that grades nothing
fails rather than passing vacuously. Both rules are the ones tck/ already
follows, for the reason its own README gives: a run that measured nothing
once reported full marks.
§What it cannot tell you
It runs each check once, so it cannot find a race. It supplies its own
message, so an executor that only misbehaves on particular input will
pass — give it that input with check_with. It supplies its own
CallContext, so an executor that reads the caller’s tenant or identity
needs check_with_context to be graded against the one it will really
meet. It bounds each drive at 30 seconds and grades an executor that
overruns rather than waiting on it, so a very slow but correct executor is
reported as a failure. And it grades the executor, not the server: the TCK
is still what says your deployment conforms.
Structs§
- Check
Result - One graded check.
- Report
- Everything the harness found.
Enums§
- Outcome
- How one check came out.
Functions§
- check
- Grades an executor against a default one-line text message.
- check_
with - Grades an executor against a message you supply.
- check_
with_ context - Grades an executor with a
CallContextyou supply.