TradingAgents/tests/unit/alerts
Andrew Kaszubski b6eca9ea07 feat(alerts): add SMS channel with Twilio integration - Issue #41 (59 tests)
Implements SMS alert delivery using Twilio API:
- SMSFormat enum (plain, compact, detailed)
- SMSStatus enum (queued, sending, sent, delivered, failed, etc.)
- SMSConfig for Twilio credentials and settings
- SMSMessageResult for delivery tracking
- SMSBatchResult for multi-recipient sends
- SMSMessageFormatter with priority indicators
- SMSChannel implementing AlertChannel protocol
- create_sms_channel factory function

Features:
- E.164 phone number validation
- Three formatting styles (plain, compact, detailed)
- Priority indicators ([!], [!!!]) for high/critical alerts
- Category prefixes (TRD, RSK, SYS, MKT, etc.)
- SMS segment counting (GSM-7 vs Unicode)
- Messaging service SID support
- Priority filtering (send only HIGH+ alerts)
- Batch sending to multiple recipients
- Retry logic with exponential backoff
- Server error retry vs client error fail-fast
- Latency tracking for performance monitoring
- Status callback URL support
- Connection test functionality

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 22:48:00 +11:00
..
__init__.py feat(alerts): add Alert Manager for orchestration and routing - Issue #38 (55 tests) 2025-12-26 22:35:41 +11:00
test_alert_manager.py feat(alerts): add Alert Manager for orchestration and routing - Issue #38 (55 tests) 2025-12-26 22:35:41 +11:00
test_slack_channel.py feat(alerts): add Slack channel with webhooks and Block Kit - Issue #40 (44 tests) 2025-12-26 22:41:45 +11:00
test_sms_channel.py feat(alerts): add SMS channel with Twilio integration - Issue #41 (59 tests) 2025-12-26 22:48:00 +11:00