controller v0.94.0: pull-based config-refresh (re-pull + self-restart on config_version change)

PushResponse.ConfigVersion from the report ACK; ConfigRefresher reconciles vs.
the last-applied version (settings.applied_config_version) and on a change calls
bootstrap.RefreshConfig (re-pull controller.yaml + re-merge local_api) then
GracefulSelfRestart. First-run records baseline (no restart); unchanged = no-op
(no storm); failed pull keeps config + retries. Companion to hub v0.26.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HxLA1mZurFq9kt8hneFeCs
This commit is contained in:
2026-06-30 21:49:47 +02:00
parent 464b14f029
commit 419d3d0b4e
9 changed files with 432 additions and 0 deletions
+5
View File
@@ -32,6 +32,11 @@ type PushResponse struct {
// "update to latest" button — never the auto-target).
MinControllerVersion string `json:"min_controller_version"`
LatestVersion string `json:"latest_version"`
// ConfigVersion is the hub's per-customer config counter (v0.26.0). On a change vs. the
// last-applied version, the controller re-pulls controller.yaml + self-restarts (pull-based config
// delivery — the hub never connects into the box). 0 = the hub didn't advertise it (old hub, or a
// report-only customer with no config row) → the controller does nothing.
ConfigVersion int `json:"config_version"`
}
// Pusher sends reports to the central hub.