Event lifecycle and ACKs
Before the request
The producer assigns a stable event_id, records event and observation time, and constructs the typed event body. The future agent must preserve that identity and those timestamps across retries. Today, the backend development probe exercises this contract; there is no functioning V2 agent delivery loop.
Durable admission
- Telemetry producer
- ingest-gateway
- Redpanda
- 2ingest-gateway: Resolve roster tenant; overwrite identity and reception
- 3ingest-gateway: Validate the entire batch
ifAll publication succeeded
elseTimeout or partial failure
Validation is whole-batch, but broker publication is not an atomic batch transaction. Some records can become durable before publication returns an error. Retrying the entire request is correct and can repeat those records. An idempotent Kafka producer does not eliminate duplicates from a separately retried HTTP request.
What the ACK proves
BatchAck has accepted, durable, and received. It contains neither an echoed batch_id nor per-record acceptances. The producer must correlate the reply to its request and require all three conditions. Inventory ACK counts are counts of records, not items.
The gateway's all-in-sync-replicas acknowledgement is only as resilient as the replication and minimum-in-sync configuration. The development topology has one replica. It provides a broker durability boundary, not replicated high availability.
Downstream effects
- Redpanda
- Consumer
- Consumer-owned store
The event writer projects the observation into ClickHouse. Analysis independently normalizes a working representation and evaluates a pinned ruleset. Detections enter a second topic. The detection writer preserves analytical evidence; the alert writer creates operator work above the configured floor and applies alert-plane folding and suppression.
An event can be acknowledged before any of these effects is queryable. Trace consumer lag and writer progress before treating a query delay as lost ingestion. Duplicates must be investigated at the relevant layer rather than suppressed indiscriminately.
Source evidence
Reviewed against the source baseline. Seagull-backend-v2/internal/ingest/http.go · Seagull-backend-v2/internal/broker/publisher.go · Seagull-backend-v2/internal/broker/consumer.go · Seagull-contracts/proto/seagull/ingest/v1/ingest.proto.