Files
plm-lottery/docs/adr/ADR-32-pagamento-ritenta-mai-due-volte.md
T
davideandClaude Sonnet 5.5 b424f670c5 Restructure docs: docs-first, SSOT, one ADR per decision
- Add docs/README.md as the index of all documentation.
- Split the 52 DEC entries of decisioni-e-limiti.md into docs/adr/ADR-NN
  files (same numbers), add ADR-53 (audit log), TEMPLATE.md and an ADR index
  with a feature -> ADR table.
- Rename decisioni-e-limiti.md to limiti-noti.md (LIM only) and rewrite all
  DEC-nn references as links to the ADRs.
- Document the docs-first / SSOT / ADR rules in processo-di-modifica.md and
  map the docs in CLAUDE.md and README.md.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 12:05:57 +02:00

1008 B

ADR-32 — Il pagamento si ritenta da solo, mai due volte

  • Stato: Accettata
  • Area: Denaro in movimento
  • Fonte di verità per: la scelta di progetto descritta qui sotto; i requisiti (PREFISSO-NN) che la attuano stanno nei documenti di dominio, indicati nelle Conseguenze.

Decisione

Il pagamento si ritenta da solo, mai due volte: un tentativo ogni 60s, usando l'ultimo payout_failed in audit come orologio; prima di costruire si rifiuta se esiste già un pagamento building/pending per il round, e si escludono le monete impegnate da pagamenti non risolti.

Codice: app/rounds/scheduler.py:RoundScheduler._retry_payout_if_due · app/rounds/scheduler.py:_reserved_payout_outpoints · Test: tests/unit/test_scheduler.py::test_trigger_payout_skips_when_already_in_flight, tests/unit/test_scheduler.py::test_tick_throttles_retry_after_a_recent_payout_failure, tests/unit/test_scheduler.py::test_reserved_payout_outpoints_excludes_utxos_claimed_by_a_stale_payout