qqeasonchen opened a new pull request, #5313:
URL: https://github.com/apache/eventmesh/pull/5313
Brings the A2A Gateway back into the Runtime, this time with the unified
control-plane stores from #5301 Sub-PR A/C as the durable backend.
## What lands
- **A2AGatewayService** — task lifecycle controller. Replaces the in-memory
TaskRegistry with TaskStore (Sub-PR A/C). A small runtime cache holds the two
fields TaskStore does not model: parentTaskId (used to render child-task
queries) and taskEpoch (the per-task counter the store requires for stale-write
rejection on updateStatus). Both caches are rebuildable from the store on a
fresh JVM.
- **A2AGatewayHttpHandler** — Netty HTTP handler for the REST + SSE API
(/a2a/tasks, /a2a/tasks/{id}, /a2a/tasks/{id}/stream, /a2a/health). SSE
registers a StatusSubscriber so intermediate PENDING → RUNNING → COMPLETED
transitions stream to the client.
- **A2AGatewayServer** — Netty HTTP bootstrap. Production wires
EventMeshA2ATransport (Runtime-bridged) for the A2AMessageTransport dependency;
tests pass an in-process transport. The weather-agent demo from PR #5260 is
removed.
- **AgentCardRegistry** + **InMemoryAgentCardRegistry** — minimal discovery
surface (isAgentRegistered / registerCard / getCard). A Meta-backed
implementation lands in D2.
## Status mapping (PR #5260 → Sub-PR A/C)
The legacy wire vocabulary stays available via A2AGatewayService.TaskState
and the toLegacyState() helper. JSON response payloads still emit
SUBMITTED/WORKING/CANCELLED so existing A2A clients do not break.
## Acceptance against issue #5302
- ✅ **A2A transport over the Runtime delivery path** — A2AGatewayService
takes an A2AMessageTransport; production wires EventMeshA2ATransport which
already bridges A2A onto UniIngressService (Sub-PR A's runtime ingress). The
parallel InMemoryA2AMessageTransport is no longer required by the gateway path.
- ✅ **A2A tasks persist through TaskStore and recover across restarts** —
createTask / updateStatus / getTask all go through the persistent store.
- ⚠️ **A2A publish/subscribe goes through the same reliability + DLQ + auth
chain** — EventMeshA2ATransport uses UniIngressService, so reliability + DLQ
already flow. Auth chain wiring is in #5297 (P2).
- ⏳ **AgentCard stored/read via MetaStore** — D2 (this PR ships the
interface and in-memory impl; Meta-backed impl is D2).
- ✅ **Documentation marks A2A as Experimental** — README banner lists the
three pieces still missing for production (TaskExpirer, Meta-ized AgentCard,
Testcontainers E2E), all scheduled for D2.
## Tests (7, all passing locally)
- **A2AGatewayServiceTest** — 6 tests: create+complete, cancel,
cancel-on-unknown, submit-to-unregistered, parent-child index, task-not-found.
Uses an in-process TaskStore (mirrors Sub-PR A's test stub) and an in-process
A2AMessageTransport that handles A2A's + single-segment wildcards.
- **A2AGatewaySmokeTest** — Netty HTTP /a2a/health loopback check.
## Not in D1 (Sub-PR D2)
- TaskExpirer reaper (periodic TaskStore.expireStale sweep)
- Meta-backed AgentCardRegistry (SessionStore-backed)
- Testcontainers fault-injection E2E
Fixes #5302 P1 acceptance criteria (partial: A2A-via-Runtime transport +
TaskStore persistence + Experimental banner). Closes #5302 for the parts of the
acceptance criteria that this PR delivers; the remaining D2 work will be
tracked in a follow-up issue.
Co-authored-by: qqeasonchen <[email protected]>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]