From 9933c039edbeb24f679be2b6a347ba6307cfcaf3 Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Sun, 19 Jul 2026 13:33:57 +0200 Subject: [PATCH] refactor(shared,backend): MigrateToApiBaseUrl nullable, drop null-forgiving operator null = no migration is the documented contract and the agent already assigns null when stripping the field from the on-disk cache; annotate the property as string? so the backend assignment needs no ! suppression. Co-Authored-By: Claude Fable 5 --- .../Functions/Config/GetAgentConfigFunction.cs | 2 +- .../Models/Config/AgentConfigResponse.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Backend/AutopilotMonitor.Functions/Functions/Config/GetAgentConfigFunction.cs b/src/Backend/AutopilotMonitor.Functions/Functions/Config/GetAgentConfigFunction.cs index e621d9b3..6d971f7b 100644 --- a/src/Backend/AutopilotMonitor.Functions/Functions/Config/GetAgentConfigFunction.cs +++ b/src/Backend/AutopilotMonitor.Functions/Functions/Config/GetAgentConfigFunction.cs @@ -314,7 +314,7 @@ namespace AutopilotMonitor.Functions.Functions.Config DeviceBlocked = killVerdict.IsBlocked, DeviceKillSignal = killVerdict.IsKill, UnblockAt = killVerdict.UnblockAt, - MigrateToApiBaseUrl = migrateTarget!, + MigrateToApiBaseUrl = migrateTarget, }); return response; diff --git a/src/Shared/AutopilotMonitor.Shared/Models/Config/AgentConfigResponse.cs b/src/Shared/AutopilotMonitor.Shared/Models/Config/AgentConfigResponse.cs index 839ca083..cb5d1b94 100644 --- a/src/Shared/AutopilotMonitor.Shared/Models/Config/AgentConfigResponse.cs +++ b/src/Shared/AutopilotMonitor.Shared/Models/Config/AgentConfigResponse.cs @@ -242,7 +242,7 @@ namespace AutopilotMonitor.Shared.Models /// config cannot chain another migration), and a kill signal always wins over it. /// Old binaries ignore the field. null = no migration. /// - public string MigrateToApiBaseUrl { get; set; } + public string? MigrateToApiBaseUrl { get; set; } } ///