Kevin

Config Sync + Hot Reload

services.yaml ↔ env ↔ running services.

Config Sync + Hot Reload (v2026-08-02T101544Z-ab2bbdebf5) 2026-08-02 | services.yaml ↔ env ↔ running services. 1 - CONFIG_SYNC_LOOP - Configuration Sync Loop ConfigSync.start() _sync_loop() Flynn daemon (master) GET /api/config/version local config version config_server.get_config_version() _sync_once() _fetch_master_version() sync event master config… local config v… 2 - CONFIG_HOT_RELOAD - Hot Reload SIGHUP signal do_reload() snapshot_env() _categorise() _apply_live_safe() env vars os.environ reload signal current env sn… 3 - CONFIG_BUS - Reactive Config Bus ConfigBus.set() _set_nested() _publish() config.json daemon/config.json event_bus config:update config:queue_depth new config val… persisted to d… 1. Start Config… 2. Fetch master… 3. Compare with… 4. Detect drift… 5. Apply change… 6. Log sync eve… 7. Handle SIGHU… 8. Snapshot cur… 9. Categorize c… 10. Apply live-… 11. Publish con… SyncEvent payload { "timestamp": "2023-10-01T12:00:00Z", "status": "success", "local_hash": "abc123...", "master_hash": "def456...", "error": null, "changes_applied": { ... } } do_reload() result { "changed_keys": ["KEVIN_LOG_LEVEL", "GRANT_ACCESS_TTL_S"], "restart_required_keys": ["KEVIN_DATABASE_URL"] } MQTT subscription is optional and falls back to HTTP polling if unavailable. Hot reload only applies live-safe changes without restarting the daemon. 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

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
config-sync
Rendered
2026-08-02T101544Z
From commit
ab2bbdebf5
Watches
6 paths
  • daemon/src/config_sync.py
  • daemon/src/config_hot_reload.py
  • daemon/src/config_bus.py
  • daemon/src/config_router.py
  • daemon/src/config_server.py
  • daemon/config