Skip to content

[Architecture Review][P0] Unified state control-plane stores #5301

Description

@qqeasonchen

Execution meta — see plan: #5296

Problem

State persistence is inconsistent across subsystems. Offsets have a RocksDB path, but subscription registration, push buffers, in-flight deliveries, and A2A tasks remain largely in-memory. A2A documentation also states that InMemoryA2AMessageTransport and the in-memory TaskRegistry are part of the current implementation.

Risks

  • A Runtime crash, restart, migration, or network partition produces uncontrollable redelivery or state loss.
  • A2A can bypass the Runtime's reliability, DLQ, audit, and authorization paths.
  • "At-least-once" cannot be formed into an end-to-end, verifiable contract.

Proposed direction

Introduce a unified state control-plane interface set:

OffsetStore
SubscriptionStore
DeliveryStateStore
SessionStore
DeadLetterStore
TaskStore

In production mode, require:

  • subscription and delivery state are recoverable;
  • ACK carries deliveryId, deliveryEpoch, and an idempotency key;
  • offsets advance monotonically only;
  • disconnected push events return to the unified dispatcher;
  • A2A tasks reuse the Runtime transport and persisted state.

Related concrete bugs

The following at-least-once reliability defects in the current develop code are the concrete manifestations of this missing unified state control plane. Landing this issue should fix them together:

Acceptance criteria

  • Each store has an interface + at least one durable implementation (RocksDB or Meta-backed).
  • Delivery state is recoverable after a hard restart (no orphaned in-flight deliveries).
  • ACK validation binds to delivery ownership (id + epoch + idempotency key).
  • A2A tasks persist through TaskStore and route through the Runtime dispatcher.

Part of the Architecture Review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementImprove the mechanism or performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions