🎉 Initial commit

This commit is contained in:
Jonas Bengtsson
2026-10-07 10:38:21 +02:00
commit 1c64aeb071
38 changed files with 3391 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
"""Connection state machine + reconnect backoff (SPECIFICATION §10.2).
States: Connecting → Connected → ReconnectWait → Connecting …
Backoff is exponential 1 s → 2 s → … capped at 60 s; every disconnect/reconnect
pair is an event (D1/D2) with the outage duration computed and reported.
The transition/backoff engine lands in Phase 1 (IMPLEMENTATION_PLAN §4.5).
"""
from __future__ import annotations
from enum import Enum
class ConnectionState(Enum):
"""States of the connection state machine (SPECIFICATION §10.2)."""
CONNECTING = "connecting"
CONNECTED = "connected"
RECONNECT_WAIT = "reconnect_wait"