Phase 2: State-Sync-Fundament – State-Store, Gruppen, Clock, Aktivierung

- ProjectStateStore (§6.4, §24.2): monotone State-/Projekt-Revisionen,
  Snapshot nach Verbindung, Delta mit neu/geaendert/geloescht,
  Szenenabruf als Zielzustand (Uebergang macht der Renderer, §18.1),
  Projekt-/Livezustand strikt getrennt
- GroupRouter (§6.3, §10.1): Ziele All/Node/Output/ServerGroup,
  Regeln selected/tag_query/all, Commit-Vorschau (§17.5)
- ClockEstimator (§6.4): RTT-Min-Filter (<=2x Min gegen Jitter),
  Offset-/Drift-Schaetzung (Drift erst ab 1 s Fenster belastbar),
  Showzeit -> lokale Node-Zeit
- ActivationCoordinator (§6.5): zeitgestempelte Preset-Aktivierung,
  200 ms Vorlauf, Arm/Execute/Ack-Kette, FAILED bei fehlender
  Arm-Bestaetigung (kein stilles Ueberbruecken)
- 35 neue Unit-Tests; Gesamtsuite 293 gruen, Ruff gruen
This commit is contained in:
HMS MediaEngine Agent
2026-09-11 01:31:26 +02:00
parent d24fe3a963
commit cc119d3751
8 changed files with 958 additions and 6 deletions
+19 -2
View File
@@ -1,6 +1,12 @@
"""hms_cluster Clusterprotokoll, Node-Registry, Paarung, Discovery
(PLAN.md §6.3, §6.5; ADR-0009, ADR-0010)."""
"""hms_cluster Clusterprotokoll, Registry, Paarung, Discovery, Gruppen,
Clock-Sync, zeitgestempelte Aktivierung (§6.3§6.5; ADR-0009/0010)."""
from hms_cluster.activation import (
ActivationCoordinator,
ArmState,
PlannedActivation,
)
from hms_cluster.clock import ClockEstimator, ClockSample, now_monotonic_ns
from hms_cluster.discovery import (
DISCOVERY_PROTOCOL_VERSION,
SERVICE_TYPE,
@@ -8,6 +14,7 @@ from hms_cluster.discovery import (
ServiceInfo,
capability_digest,
)
from hms_cluster.groups import GroupRouter, GroupRule, ServerGroup, TargetKind
from hms_cluster.message import ClusterMessage, CommandStatus, CommandTracker
from hms_cluster.pairing import (
PairingPin,
@@ -51,4 +58,14 @@ __all__ = [
"NodeEntry",
"NodeHealth",
"NodeRegistry",
"GroupRouter",
"GroupRule",
"ServerGroup",
"TargetKind",
"ClockEstimator",
"ClockSample",
"now_monotonic_ns",
"ActivationCoordinator",
"ArmState",
"PlannedActivation",
]