fix(notifications): SMS adapter short-circuits on first transient — kills duplicate amplification and bounds the dispatch sweep
Claude-Session: https://claude.ai/code/session_01MtdgwpEeCUn6cUA5f1LMPj
This commit is contained in:
@@ -99,7 +99,7 @@ The `SmsNotificationDeliveryAdapter` delivers notifications to an SMS list via t
|
||||
SMS has no BCC mechanism. The adapter sends one Twilio request per recipient and classifies each:
|
||||
|
||||
- **All accepted** → `Success`; `ResolvedTargets` is snapshotted with the accepted numbers.
|
||||
- **Any transient failure** → `Transient` (the whole notification retries at the fixed interval, then Parks after max-retries). Numbers already accepted on a prior attempt are re-texted on retry — the same "re-send to all" characteristic the Email adapter already has with BCC. (v1 does not track per-recipient state; that is a documented future enhancement.)
|
||||
- **Any transient failure** → `Transient` (the whole notification retries at the fixed interval, then Parks after max-retries). Numbers already accepted on a prior attempt are re-texted on retry — the same "re-send to all" characteristic the Email adapter already has with BCC. The recipient loop stops at the **first** transient rather than attempting the remaining recipients: every recipient accepted after the first transient would just be a guaranteed duplicate text on retry, and stopping early also bounds a black-holed endpoint to one request timeout per sweep instead of recipients × timeout. (v1 does not track per-recipient state; that is a documented future enhancement.)
|
||||
- **No transient failures, mix of accepted + permanent-bad** → `Success` to the good numbers; permanently-bad numbers are recorded in `LastError`. The notification is not parked if anything got through.
|
||||
- **All permanent / no recipients / no SMS config / list-not-found** → `Permanent` (Park).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user