hub v0.45.0: floor-UI separation + effective-floor source + per-box MinAgent conditional floor

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PSK5g6qYLknKj8u3QAFEr6
This commit is contained in:
2026-07-11 15:33:14 +02:00
parent 37e60b46d2
commit bbecf0592e
15 changed files with 730 additions and 44 deletions
+9 -2
View File
@@ -381,8 +381,15 @@ func (h *Handler) handleReport(w http.ResponseWriter, r *http.Request) {
// version against the floor and auto-updates when below it (latest stays the customer's opt-in
// "update to latest" button — NOT the auto-target). Both fields are omitted when empty, so an old
// controller that ignores them, or a hub with no floor configured, behaves exactly as before.
if floor := h.store.EffectiveMinControllerVersion(payload.CustomerID); floor != "" {
resp["min_controller_version"] = floor
// Part D: the per-box MinAgent conditional floor — HOLD the controller-version floor for a box
// whose host agent is below the current golden's required MinAgent (never push a controller past
// the agent it depends on). A held box gets NO directive (behaves as if no floor) but is flagged
// on the dashboard, never silently stale.
if fd := h.store.ResolveManagedFloor(payload.CustomerID); fd.Floor != "" {
resp["min_controller_version"] = fd.Floor
} else if fd.Held {
h.logger.Printf("[INFO] managed floor HELD for %s: agent %q < MinAgent %s (controller floor withheld)",
payload.CustomerID, fd.AgentVersion, fd.MinAgent)
}
if h.latestVersion != nil {
if latest := h.latestVersion.LatestVersion(); latest != "" {