From 5ee72db2e27f771bcc75b7e754f3d6fe996f2393 Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Thu, 28 May 2026 14:22:27 +0200 Subject: [PATCH] chore(agent-v2-tests): silence xUnit1012 by marking errorCode nullable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Codex review hygiene: the new `AppStateChange_Error_promoted_carries_failureType_and_errorCode` Theory passes null via [InlineData(EspAppsTimeout, null)] for the no-HRESULT fallback case, but declared the parameter as non-nullable `string` (the test project has enable). Switch to `string?` to match the value flow and silence the xUnit1012 analyzer warning. Behaviour unchanged — the test still asserts that the no-HRESULT branch omits the DataJson.errorCode key entirely. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../SignalAdapters/ImeLogTrackerAdapterTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Agent/AutopilotMonitor.Agent.V2.Core.Tests/SignalAdapters/ImeLogTrackerAdapterTests.cs b/src/Agent/AutopilotMonitor.Agent.V2.Core.Tests/SignalAdapters/ImeLogTrackerAdapterTests.cs index 59bb2ee3..1672780f 100644 --- a/src/Agent/AutopilotMonitor.Agent.V2.Core.Tests/SignalAdapters/ImeLogTrackerAdapterTests.cs +++ b/src/Agent/AutopilotMonitor.Agent.V2.Core.Tests/SignalAdapters/ImeLogTrackerAdapterTests.cs @@ -352,7 +352,7 @@ namespace AutopilotMonitor.Agent.V2.Core.Tests.SignalAdapters [InlineData(AutopilotMonitor.Shared.Constants.AppFailureTypes.EspAppsTimeout, null)] [InlineData(AutopilotMonitor.Shared.Constants.AppFailureTypes.EspAppsDetectionFailure, "0x87d1041c")] [InlineData(AutopilotMonitor.Shared.Constants.AppFailureTypes.EspAppsInstallFailure, "0x80070643")] - public void AppStateChange_Error_promoted_carries_failureType_and_errorCode(string failureType, string errorCode) + public void AppStateChange_Error_promoted_carries_failureType_and_errorCode(string failureType, string? errorCode) { // Codex review follow-up (P1) — when the V2 EnrollmentTerminationHandler // promotes an app from Installing -> Error via