OTP DLT Rollback
Document Info
- Purpose
- Immediately revert OTP SMS from DLT (`route=dlt`) to legacy free-text (`route=q`) without code deploy.
- Intended Audience
- On-call engineers, operations.
- Last Updated
- 2026-06-05 (Phase 8D)
- Related Documents
- Outage ResponseOTP DLT Migration
When to rollback
- DLT provider rejection at scale
- Incorrect template metadata discovered in production
- OTP delivery success rate below SLO
- Any P1 incident during DLT rollout
Rollback procedure
Steps
- Set
OTP_DLT_ENABLED=falsein deployment environment (orbackend/.env). - Restart the backend process (required — env read at startup).
- Verify startup log:
otp_dlt_activation_statuswith"globalEnabled": false. - Send test OTP — logs should show
deliveryMode: legacy_qand nootp_dlt_dispatch. - Confirm
provider_responsewithroute: q(NOTIFICATION category).
Time to effect: One process restart.
Per-app rollback (without global flag)
Set dltEnabled: false in backend/config/otp-mappings.json for the affected app and restart.
Global flag off overrides all apps immediately.
Re-enable fallback for a DLT-only app (Phase 8D)
Use when a retired app (legacyRouteEnabled: false) experiences DLT failures and you need route=q fallback without disabling DLT globally.
Steps
- Edit
backend/config/otp-mappings.json— setlegacyRouteEnabled: truefor the affectedappId. - Restart backend.
- Verify startup log
otp_cutover_statusshows app inhybridApps(notretiredApps). - Confirm
/platform/otp→ Delivery policy shows Fallback: enabled, Mode: Hybrid. - Trigger test OTP; on simulated DLT failure, logs should show
otp_dlt_fallbackthenproviderRoute: q.
Time to effect: One process restart.
Cutover checklist (reverse)
- Root cause of DLT failure understood
- Stakeholder notified of temporary hybrid mode
-
otp_dlt_hard_failurerate returns to zero - Plan to re-retire (
legacyRouteEnabled: false) after 30-day stability
User impact
| Scenario | Impact |
|---|---|
| Rollback before send completes | User sees 502; OTP revoked; can retry |
| Rollback after successful send | OTP valid; SMS already delivered (DLT or legacy) |
| Mixed in-flight | Some DLT, some legacy SMS; verify unchanged |
API contracts unchanged — clients cannot distinguish delivery mode from responses.
Verification checklist
-
OTP_DLT_ENABLED=falsein running environment -
otp_dlt_fallbackmay appear if global was true with per-app off; after global off, fallback stops -
otp_delivery_completedshowsdeliveryMode: legacy_q,providerRoute: q - OTP verify flow unchanged
Re-enable
Follow Rollout runbook after root cause fixed.