Repository navigation
Description
Context
The current tests/sut/tck_sut.cpp serves two different purposes:
- it is the system under test used by the mandatory A2A TCK conformance workflow;
- it is also reused by the wire-level performance runner.
PR #223 added performance-oriented instrumentation that is useful for profiling streaming and subscription latency, including HTTP connection diagnostics and optional subscription phase diagnostics.
This works, but it couples the conformance SUT to performance-only behavior. In particular, the TCK SUT can be compiled with A2A_ENABLE_SUBSCRIPTION_DIAGNOSTICS and emits performance diagnostics that the performance runner parses from the SUT log.
The conformance binary should not need to know about performance diagnostics.
Goal
Separate conformance and performance entry points while keeping one shared SUT runtime implementation.
The desired structure is:
-
tck_sut- used only for protocol/conformance validation;
- contains no performance diagnostics;
- has no dependency on subscription-diagnostics build flags or diagnostic output formats.
-
performance_sut- used by wire-level performance tests;
- uses the same protocol/runtime implementation as
tck_sut; - owns HTTP/performance counters, subscription diagnostics, and other performance-only instrumentation.
Both binaries should be thin entry points over a shared internal SUT runtime so protocol behavior cannot drift between conformance and performance testing.
Proposed design
Extract the common SUT implementation currently living in tests/sut/tck_sut.cpp into a reusable internal runtime, for example:
tests/sut/
sut_runtime.h
sut_runtime.cpp
tck_sut.cpp
performance_sut.cpp
SutRuntime should own the common behavior required by both entry points, including:
- endpoint parsing;
- REST, JSON-RPC, and gRPC transport setup;
- agent-card setup;
- in-memory/PostgreSQL store selection;
- HTTP listener/socket lifecycle;
- request routing;
- connection shutdown;
- subscription shutdown;
- deterministic process lifecycle.
Performance-only instrumentation should remain outside the conformance entry point and be enabled only by performance_sut.
The exact file/class names are not mandatory; the important constraint is one shared runtime with two small, purpose-specific binaries.
Scope
1. Extract the shared SUT runtime
Move reusable server setup and lifecycle behavior out of tests/sut/tck_sut.cpp.
Avoid duplicating transport setup, store setup, routes, fixtures, or shutdown behavior between the two executables.
2. Keep tck_sut conformance-only
The tck_sut executable must:
- retain the current TCK endpoints and protocol behavior;
- retain in-memory and PostgreSQL support;
- remain compatible with
scripts/run_tck_sut.shand the mandatory TCK workflow; - contain no subscription-performance diagnostics;
- contain no performance diagnostic output prefixes or counters;
- not require
A2A_ENABLE_SUBSCRIPTION_DIAGNOSTICS.
Where diagnostics such as A2A_HTTP_DIAGNOSTICS exist solely for performance reporting, move them out of tck_sut as well.
3. Add performance_sut
Add a dedicated wire-performance executable that uses the same shared SUT runtime.
It should provide the instrumentation currently required by the performance runner, including as applicable:
- HTTP connection/reuse diagnostics;
- finite-stream connection diagnostics;
- subscription phase diagnostics when
A2A_ENABLE_SUBSCRIPTION_DIAGNOSTICSis enabled; - performance-specific shutdown reporting.
Performance instrumentation must not alter A2A protocol semantics or benchmark fixtures.
4. Update the performance runner
Update scripts/run_performance_tests.py / related scripts to launch performance_sut for wire scenarios instead of tck_sut.
Prefer introducing a performance-specific executable setting such as A2A_PERF_SUT.
If temporary backward compatibility with A2A_TCK_SUT is useful during migration, keep it explicitly documented and remove it once all callers use the new name.
Do not change benchmark scenarios, request counts, event counts, success criteria, or measured coordinate semantics as part of this refactor.
5. Update build and CI wiring
Update CMake and CI so:
tck_sutis built for conformance without performance-diagnostics requirements;performance_sutis built for performance tests;- the subscription-diagnostics smoke builds/runs the performance SUT;
- normal wire performance tests use
performance_sut; - TCK workflows continue to use
tck_sut.
6. Keep report compatibility initially
Do not combine this architectural cleanup with an unnecessary performance-report schema migration.
Existing result fields should remain compatible where practical.
For example, renaming a historical driver_type such as wire_tck_sut to wire_performance_sut can be handled separately unless the change is required for correctness.
Non-goals
- Changing public SDK APIs.
- Changing A2A protocol behavior.
- Changing TCK fixtures or mandatory-category semantics.
- Changing performance benchmark event counts or success criteria.
- Optimizing performance as part of the extraction.
- Maintaining two independently implemented SUTs.
Acceptance criteria
-
tck_sutandperformance_sutuse one shared internal runtime for common transport/server/store behavior. -
tck_sutcontains no performance-only diagnostic counters, emitters, prefixes, or subscription-diagnostics code. -
tck_sutdoes not depend onA2A_ENABLE_SUBSCRIPTION_DIAGNOSTICS. - Normal TCK execution remains behaviorally equivalent for REST, JSON-RPC, and gRPC.
- Mandatory TCK tests pass for both in-memory and PostgreSQL backends with no executed-test failures.
-
performance_sutprovides all diagnostics currently required by the normal performance suite and subscription-diagnostics smoke. - Existing wire performance scenarios still execute with unchanged fixtures and measurement semantics.
- Performance reports contain zero operation errors in the standard smoke validation.
- Tests prevent the two entry points from silently diverging in shared endpoint/runtime configuration.
-
./scripts/verify_changes.shpasses. -
./scripts/run_clang_tidy.sh buildpasses. - Repository-wide
clang-format --dry-run --Werrorpasses. - Mandatory performance smoke validation passes.
- Documentation describing the performance SUT and TCK SUT is updated.
Motivation
The TCK SUT should answer one question: is the SDK/server implementation protocol-conformant?
The performance SUT should answer a different question: how does that same implementation behave under measured wire workloads, and where is time being spent?
Sharing the runtime keeps behavior equivalent while separating those concerns and prevents future performance instrumentation from adding complexity to the conformance fixture.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity