feat(redis): implement connection pool with backoff and health checks
Add comprehensive Redis connection resilience with exponential backoff,
health monitoring, and graceful degradation.
Changes:
- Add RedisConfig.health_check_interval_secs (default: 30s)
- Add RedisConfig.max_backoff_secs (default: 10s)
- Create RedisPool with ConnectionManager for connection management
- Implement exponential backoff (100ms → 10s)
- Add health check loop running every 30s
- Track consecutive failures, enter degraded mode after 5 failures
- Update JobQueue to use connection pool
- Update PhashCache to use connection pool
- Add Redis metrics: connection_failures, reconnect_attempts, health_status
- Add unit tests for backoff calculation
Architecture:
- RedisPool manages single ConnectionManager with automatic reconnection
- Connection failures trigger exponential backoff with configurable max
- Health checks run in background task, updating metrics
- Queue and cache operations get connections from pool transparently
- Metrics track connection health in real-time
Tests:
- 2 new unit tests for backoff calculation
- 29 total tests passing (3 pre-existing failures in jetstream/events)
Addresses Task 2 requirements from PLAN_REMAINING.md.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>