pa-05 — Verification

One command

cd pa-05-delivery-semantics-saga && bash scripts/verify.sh

What the tests prove

TestInvariant
TestOutboxAtomicAndAtLeastOncecrash-before-mark re-publishes; idempotent sink → effectively-once; no unpublished left
TestOutboxNoLostEventsVsBrokenDualWritebroken dual write loses the event; outbox keeps state↔event 1:1
TestSagaHappyPathall forward steps run; nothing compensated
TestSagaCompensatesInReversea mid-saga failure compensates completed steps in reverse order
TestSagaResumeAfterCrashresuming from persisted progress runs only remaining steps

All under -race.

What "green" does NOT guarantee

  • No real DB/CDC. The "transaction" is a mutex; production uses a DB transaction + Debezium or a robust polling publisher.
  • No durable orchestrator. RunFrom models resume; a real saga persists per-saga state with retries/timeouts/alerting.
  • Compensation reliability is on you. Failed compensations need retries + alerting (pa-09); not handled here.