Skip to main content

Failure and consistency model

Failure boundaryCurrent behaviorOperator implication
Gateway → brokerNo durable ACK on failure; request may have partially publishedKeep producer data and tolerate duplicates
Consumer → storeRetry transient failures; progress follows completed deliveryGrowing lag can represent protected work
Poison recordWriter-specific quarantine with source position and reasonMonitor quarantine; it is preserved failure evidence
Control registry → admission logRegistry keeps unannounced changes for retryAdmission changes propagate asynchronously
Ruleset activation → engineIncompatible activation is refused; last executable set remainsPublished or active in the log is not proof every engine switched
Engine partition reassignmentRewind and rebuild bounded stateCatch-up load accompanies restart and scaling
Control process restartIn-memory sessions disappearCallers must establish new sessions
Agent damaged installation stateStartup refuses rather than silently inventing identityRepair or explicitly replace the installation

Consistency is workload-specific

An ACK gives a broker durability result, while query visibility depends on asynchronous writers. PostgreSQL stores mutable control records and their trails. Rulesets and admission rosters replicate through compacted topics. Gateways can temporarily hold an earlier roster revision while a newer control decision propagates.

Inventory currentness is determined by the newest full scan for a kind. Item projection and scan-watermark persistence must be understood together; an ADR is not proof that every multi-write operation is atomic. The integration tests and actual projector code define the supported recovery behavior.

Failure is observable, not equivalent to loss

An unavailable broker, saturated capacity, or failed write should surface as a refusal, retry, lag, or failure metric. A record committed beyond retention cannot be reconstructed from the broker. Quarantine and storage retention likewise bound recovery. Backups and retention are therefore part of the operational recovery plan.

Source evidence

Reviewed against the source baseline. Seagull-backend-v2/internal/broker/consumer.go · Seagull-backend-v2/internal/control/admissions.go · Seagull-backend-v2/internal/control/sessions.go · Seagull-agent-v2/internal/identity/identity.go · Seagull-backend-v2/docs/decisions/0027-inventory-is-a-record-kind-of-its-own.md.