Skip to content

ADR-0005: Cut over per account cohort, with kill switch and per-payment mode

Status: Accepted ยท Date: 2026-10-19

Decision

  • A WalletAuthorisationStrategy port with one adapter per DecisionMode (DIRECT_DEBIT, HOLD_CAPTURE).
  • DecisionModeRouter: CRC32(accountNo) % 100 < hold-capture-percent selects HOLD_CAPTURE for new payments. The bucketing is stable, so ramping 10 โ†’ 50 never moves an account back.
  • kill-switch=true โ†’ every new payment uses DIRECT_DEBIT, immediately.
  • payment.decision_mode is persisted. Workers dispatch on the stored mode, so in-flight payments always finish with the mechanism that started them.

Consequences

  • + Gradual, reversible, observable, with a control cohort on Phase 1 throughout the ramp.
  • + Kill switch works mid-flight without stranding holds.
  • โˆ’ Both code paths are maintained until v1-for-authorisation is retired.