Kevin

Daemon HA + Peer Federation

HA election + peer auth + cross-machine state.

Daemon HA + Peer Federation (v2026-09-30T101931Z-5e473105f4) 2026-09-30 | HA election + peer auth + cross-machine state. 1 - Daemon HA Election DaemonHA daemon_ha.py elect() heartbeat() StandbyMirror daemon_ha.py start() snapshot() heartbeat 2 - Daemon Federation DaemonFederation daemon_federation.py receive_holon_sync() receive_event_sync() HTTP Client httpx POST /api/daemon/federation/holon POST /api/daemon/federation/event holon sync 3 - Peer Fabric Protocol FabricPeer fabric_peer.py announce_presence() announce_service() MQTT Broker kv/net/peers/{machine_id} kv/net/services/{machine_id}/{svc} peer presence 1. DaemonHA elects primary 2. StandbyMirror starts 3. DaemonFederation receives sync 4. FabricPeer announces presence 5. HTTP Client sends event Heartbeat Payload { "machine": "machine1", "pid": 12345, "uptime_s": 3600, "role": "primary", "api_url": "http://localhost:8001", "timestamp_iso": "2026-05-20T12:34:56Z" } Federation Holon Sync Payload { "holon_id": "xxx-123-abc", "action": "claimed", "role": "flynn-claude", "timestamp": "2026-05-20T12:34:56Z", "result": { ... } } Daemon HA uses MQTT for state sync Federation relies on HTTP for cross-daemon communication Peer Fabric Protocol uses retained MQTT messages for service discovery Legend actor = initiates work · process = code path · store = state on disk · bus = durable queue · dashed = separate process cyan = request flow · pink = state read/write · dashed green = pull / return path · red = refusal As of 2026-09-30 10:19 UTC, from commit 5e47310

Provenance

This drawing is generated, not drawn. It is rebuilt from the source files below, so when they change the picture changes — a diagram here cannot quietly describe a system that no longer works this way.

Owner
Kevin
Slug
daemon-ha-federation
Rendered
2026-09-30T101931Z
From commit
5e473105f4
Updated
30 Sep 2026, 10:19 UTC
Sources at
5e47310
Watches
5 paths
  • daemon/src/daemon_ha.py
  • daemon/src/daemon_federation.py
  • daemon/src/fabric_peer.py
  • daemon/src/daemon_presence.py
  • daemon/src/daemon_registry.py