Goal
Connect the validated RED detector to the validated reconnect controller with conservative safeguards.
Preconditions
Scope
- Enable auto reconnect only after continuous RED exceeds the configured grace period.
- Require valid battle/reconnectable state and reject replay.
- Re-check
IConnectionManager.isConnected() immediately before forcing disconnect.
- Single-flight one outage -> one reconnect attempt.
- Reset only after a healthy/reconnected state is observed.
- Add cooldown/backoff policy with a conservative default of one automatic attempt per outage.
- Preserve Ctrl+K as manual fallback.
State machine
MONITORING -> LAG_SUSPECTED -> RECONNECTING -> WAITING_LOGIN -> CONNECTING -> MONITORING
Terminal/guard paths must return to a safe idle/login state without retry loops.
Acceptance criteria
- Brief RED spikes never disconnect.
- Sustained validated RED can trigger exactly one reconnect.
- No duplicate trigger from callback races or repeated samples.
- If WoT has already disconnected itself, SmartReconnect does not force a second disconnect.
- Long internet outages do not create an infinite login loop.
- Manual fallback remains functional.
Tests
- 0.5-2s RED spikes.
- 3s+ sustained RED.
- RED recovers at the threshold boundary.
- stock disconnect races the SmartReconnect threshold.
- long offline period.
- server-side outage/restart.
- exit/arena change while RED is active.
Goal
Connect the validated RED detector to the validated reconnect controller with conservative safeguards.
Preconditions
Scope
IConnectionManager.isConnected()immediately before forcing disconnect.State machine
MONITORING -> LAG_SUSPECTED -> RECONNECTING -> WAITING_LOGIN -> CONNECTING -> MONITORINGTerminal/guard paths must return to a safe idle/login state without retry loops.
Acceptance criteria
Tests