SR-018 — Dependable, Auditable Multi-Step Order Transaction Coordination: System Requirements

By Engineering Team•October 8, 2026•6 min read
Metadata Details
System Name order-service — Transaction Coordination Capability
Document ID SR-2026-TXN-001
Author Engineering Team
Status Approved

Traces back to BRD-017 — Dependable, Auditable Coordination of Multi-Step Order Transactions.

This document specifies the requirements for the generic coordination capability itself — the one BRD-017 requires to be provably dependable and fully auditable — as distinct from SR-014, which specifies how the checkout transaction specifically uses that capability (what steps it runs, in what order, handed off to which services). A requirement here is about the coordination mechanism in general; a requirement in SR-014 is about this one saga’s own sequencing.


Functional Requirements

Coordination Mechanism — Built-In Reliability Primitives, Not Hand-Built

  • FR-01 (Retry, Durable-Timer, and Signal Primitives MUST Be Supplied by the Coordination Engine): the coordination mechanism MUST provide retry-on-failure, durable (restart-surviving) timeout/wait handling, and addressable signal delivery to a specific in-progress transaction instance as built-in platform guarantees. The service MUST NOT implement any of the three as bespoke application code (a custom retry-count column, a polling-based timeout sweep, or a hand-rolled wake-up registry). order-service satisfies this by running its checkout transaction on Temporal (Go SDK) — see ADR-00034.
  • FR-02 (Crash Recovery MUST Be a Property of the Coordination Engine, Not of Service Code): an unexpected restart of the process executing a coordinated transaction MUST NOT lose track of which step that transaction had reached. order-service satisfies this via Temporal’s server-side persisted workflow execution history, replayed automatically by the SDK on worker restart.

Coordination Style — Single Addressable Coordinator

  • FR-03 (One Addressable Coordinator Instance per Transaction): each multi-step transaction MUST be coordinated by exactly one addressable instance holding the transaction’s full context — not a set of independently-reacting services inferring context from each other’s published events. This is required specifically so that a compensating decision spanning more than one prior step (e.g. a late failure requiring both a refund and a stock release) can be made with full knowledge of what already completed, rather than reconstructed from partial, locally-visible information. See ADR-00033.

Audit Record — Independently Queryable, Append-Only

  • FR-04 (A Per-Transaction Audit Record MUST Exist, Independent of the Coordination Engine’s Own Internals): every coordinated transaction MUST produce a dedicated, append-only history record — one entry per step transition, each carrying the step name, its outcome, a timestamp, and any relevant metadata — queryable directly by any internal service or support tool without requiring access to, or familiarity with, the coordination engine’s own execution-history store. order-service satisfies this via the order_orchestrations collection’s SagaHistory array, written by AppendStepTransitionActivity. See Architecture-00014.
  • FR-05 (Step and Outcome Vocabulary MUST Be a Closed Set): every audit-record entry’s step name and outcome status MUST be drawn from a fixed, closed set of constants, never a free-text string — so an automated reconciliation job or a support tool can rely on exact-match comparison rather than string interpretation.
  • FR-06 (The Audit Record MUST Be Isolated From the Business Record It Describes): the per-transaction audit record MUST be stored separately from the domain record it describes (e.g. the order document) — the coordination mechanism’s own bookkeeping (in-progress markers, transient retry attempts) MUST NOT be capable of mutating the business record it’s tracking.

Non-Functional Requirements

Reusability

  • NFR-01 (The Coordination Capability MUST Be Reusable Across Future Transactions, Not Rebuilt per Saga): the retry/timer/signal/crash-recovery guarantees required by FR-01/FR-02 MUST be satisfied by a platform-level capability usable by any future multi-step transaction this platform adds, not re-implemented individually for each one.

Multi-Tenancy & Security

  • NFR-02 (The Audit Record Carries the Platform’s Standard Audit Fields): the per-transaction audit record MUST carry the platform’s mandatory five audit columns (tenant_id, created_user_id, updated_user_id, created_at, updated_at), sourced from the auth context exactly as every other collection in this platform requires — see the Layered Architecture coding standard.

Deployment

  • NFR-03 (Coordination Engine Infrastructure Is Explicit, Not Implicit): any infrastructure the coordination engine itself requires (a dedicated server/cluster, a dedicated worker process) MUST be an explicit, documented deployment dependency — never assumed to run automatically alongside the service that schedules work against it. See SR-014’s NFR-01 for the checkout saga’s own instance of this requirement.