fix(galaxy): #872 detail-0 failure rows route on category, not detected_by
Every raw detected_by value names an MXAccess layer (requesting/responding LMX, NMX, automation object); the gateway's own failures arrive as ProtocolStatus. The 'non-zero source = transport failure' rule made a failure the responding object detected a comms error. Item 1 of #872 (Warning/Pending categories) stays open pending a captured row. Claude-Session: https://claude.ai/code/session_01GT67AD99zQQqpLCVm3p7xk
This commit is contained in:
@@ -140,12 +140,18 @@ public sealed class StatusCodeMapTests
|
||||
logger.Entries.Count.ShouldBe(1);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that non-zero DetectedBy maps to communication error when detail is zero.</summary>
|
||||
[Fact]
|
||||
public void FromMxStatus_SuccessZero_DetailZero_DetectedByNonZero_IsCommunicationError()
|
||||
/// <summary>
|
||||
/// #872: detected_by names an MXAccess layer (3 = responding NMX), not a transport failure, so a detail-0
|
||||
/// failure row routes on its category — a communication-category row is still BadCommunicationError.
|
||||
/// </summary>
|
||||
[Theory]
|
||||
[InlineData(MxStatusCategory.Unspecified, 0x80000000u)]
|
||||
[InlineData(MxStatusCategory.CommunicationError, 0x80050000u)]
|
||||
[InlineData(MxStatusCategory.ConfigurationError, 0x80890000u)]
|
||||
public void FromMxStatus_SuccessZero_DetailZero_RoutesByCategory_NotDetectedBy(MxStatusCategory category, uint expected)
|
||||
{
|
||||
var s = new MxStatusProxy { Success = 0, Detail = 0, RawDetectedBy = 3 };
|
||||
StatusCodeMap.FromMxStatus(s).ShouldBe(StatusCodeMap.BadCommunicationError);
|
||||
var s = new MxStatusProxy { Success = 0, Detail = 0, RawDetectedBy = 3, Category = category };
|
||||
StatusCodeMap.FromMxStatus(s).ShouldBe(expected);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that all-zero status maps to Bad status code.</summary>
|
||||
|
||||
Reference in New Issue
Block a user