State model
A durable saga record owns step status, retries, deadlines, compensation and custody. Source systems retain legal business state.
A multi-step request may succeed in one system and fail in another, leaving the customer, ledger and case record with different views of completion.
The reconciler models each intended effect and compensation path, reads back every system independently, and moves the request to completed, compensated, pending or human-recovery state.
Organisations, systems and operating conditions are intentionally anonymised and recomposed. The design demonstrates engineering and banking-domain reasoning; it does not represent a named client estate, vendor product or measured production result.
Five operating planes separate interaction, identity, decision control, authoritative state and operating evidence.
Permitted workThe assurance layer observes and evaluates; it may trigger a stop or review but cannot redefine business policy from telemetry alone.
Consistency ruleCarry one correlation chain across synchronous and asynchronous hops and separate event occurrence from observation and processing time.
Hard boundaryThe model is not a system of record, identity provider, policy authority or proof that an external effect occurred.
The journey can change account, payment, case or document state across systems that do not share one transaction boundary.
Retry and compensation require idempotency, current-state verification and explicit authority; narrative success cannot close an unknown effect.
A deterministic outer workflow contains model-led work inside typed, observable calls. Dashed messages remain proposals until policy or a human grants authority.
A durable saga record owns step status, retries, deadlines, compensation and custody. Source systems retain legal business state.
Mutating calls pass through typed capability contracts. Events notify downstream services, but command acceptance and effect readback remain distinct.
Use idempotent local transactions and eventual cross-system consistency. Unknown outcome is a first-class state, not an exception hidden by retry.
These roles are deliberately vendor-neutral. Each can be independently owned, versioned and replaced.
Runs a versioned state machine with explicit waits, deadlines, retries, compensations, human tasks and terminal states.
Exposes typed, allow-listed capabilities with schema validation, delegated identity, idempotency, timeout semantics and effect readback.
Classifies unknown outcomes, replays idempotent work, runs compensations and restores from the last verified checkpoint.
Builds time-qualified projections from source events and reconciliations without becoming the legal system of record.
Appends request, versions, policy result, model proposal, approval, action receipt, readback, correction and custody events under one correlation key.
Evaluates identity, purpose, capability, amount, risk tier and policy version; returns allow, deny, step-up or human-review with reasons.
Durable records carry provenance, authority, effect and custody without turning a transcript into an uncontrolled memory store.
Carry one correlation chain across synchronous and asynchronous hops and separate event occurrence from observation and processing time.
The selected design is not universally superior. It is the safer fit for this boundary and failure cost.
Keep consequential state transitions deterministic and use models inside bounded steps.
Let the model choose the complete path and recovery sequence.
Cost acceptedThe shell reduces flexibility, but makes deadlines, retries, permissions and recovery testable.
Use direct calls for narrow same-domain reads; mediate cross-domain, reusable or mutating capabilities.
Force every call through one integration pattern.
Cost acceptedMediation adds a hop and ownership overhead; direct calls increase coupling and duplicate controls.
Use local commits, idempotent steps, compensations and an unknown-outcome state.
Attempt one atomic transaction across independent banking systems.
Cost acceptedSagas expose temporary inconsistency and require recovery logic, but fit systems that cannot share one transaction boundary.
Use event-fed projections for scale and direct readback for consequential effects.
Fan out to all systems of record for every interaction.
Cost acceptedRead models introduce lag and reconciliation work, but reduce source load and make cross-system views feasible.
Use append-only events plus a rebuildable current-state projection.
Overwrite the case row with its latest status.
Cost acceptedReplay and storage are more complex, but point-in-time reconstruction and correction lineage remain possible.
Compile stable decision logic and retain retrieval for explanation and residual ambiguity.
Ask a model to interpret the source document for every request.
Cost acceptedRule compilation needs controlled change, but creates repeatable decisions, regression tests and clear exceptions.
Retries are bounded by knowledge of business effect; unknown outcome remains visible, owned and independently reconciled.
Actual thresholds belong to accountable service owners. The design exposes the equations and observables that those owners must baseline.
peak_action_rate = requests_per_second x steps_per_requestreconciliation_load = timed_out_actions + mismatched_readbacksrecovery_capacity = open_unknown_outcomes / owner_resolution_rateCollect the minimum diagnostic metadata, tokenise subjects and keep raw prompts or case evidence behind stricter access and retention.
A design is production-ready only when teams can prove what happened, recover it and change it safely.
trace and outcome completeness
control-bypass and false-negative review
cost and human-effort attribution
kill-switch and recovery exercise
Intended effects, action keys, system receipts, readbacks, discrepancy state, compensation decision, customer notice and final reconciliation.
Operations owns unknown or non-reversible outcomes and approves exceptional compensation.
Automate reversible steps first. Expand authority only after duplicate, timeout, compensation and operator-recovery tests pass under peak load.
Service, control, finance, model, data and operations owners interpret evidence and decide intervention.