Galaxy StatusCodeMap: Warning/Pending status rows and the detected_by comms-error rule (#866 review residuals) #872
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Residuals from the #866 review (
StatusCodeMap.FromMxStatus); neither is a regression and neither has live evidence yet.WarningorPendingwith a non-zero detail is notIsSuccess()and falls to plainBad(with a once-per-pair warning). An MXAccess Warning is arguably Uncertain rather than a failure. Capture a real Warning/Pending row before choosing.RawDetectedBy != 0 ⇒ BadCommunicationError(detail 0 failure rows). The rule assumes non-zerodetected_bymeans a pre-MXAccess transport failure, but in the worker converter's numbering 0 isRequestingLmxand 1–5 are LMX/NMX/automation-object sources. A failure the responding automation object detected becomes a comms error. Re-derive the rule from the gateway'sMapSourceand fix it with the test that pins it (FromMxStatus_SuccessZero_DetailZero_DetectedByNonZero_IsCommunicationError).Item 2 fixed in
1a08b4f7(master363f0d81). Every rawdetected_byvalue names an MXAccess layer: 0 requesting LMX, 1 responding LMX, 2 and 3 NMX, 4 and 5 automation object. The gateway's own failures arrive asProtocolStatus, so the "non-zero source = transport" rule had no basis. Failure rows with detail 0 now route on their category. Item 1 (Warning/Pending categories) stays open until a real row is captured.Part 2 (detected_by rule): the rule itself was already removed on master by
1a08b4f7— detail-0 failure rows now map on category only.633f4317adds per-source coverage (raw -1, 0–5, 77 × 7 categories) plus the live-captured shape from mxgw docs/AlarmProbeFindings.md:242-244 (OperationalError detected by RespondingAutomationObject must not become BadCommunicationError); mutation-checked against the old rule (10 cases fail). Source: mxgw MxStatusProxyConverter.MapSource (Worker/Conversion/MxStatusProxyConverter.cs:244-256); proto says branch on category. Done.Part 1 (Warning/Pending → currently Bad): unchanged. No live Warning/Pending row exists and neither the worker (only maps raw 1→Pending, 2→Warning) nor the docs define their semantics. Leaving this issue open + blocked on a live capture.
Item 1: live capture attempt on windev (DEV Galaxy through mxaccessgw
447070a5, 2026-11-13 UTC). Evidence in mxaccessgwdocs/LiveCaptures-2026-11-13.md§3 (commit9e4be258).No
Warningrow (raw category 2) was produced by any of these:Pending(raw 1) was captured, but only as the synchronous return ofSuspend/Activateon an advised, resolved item: success = -1, detail 0, RequestingLmx. MXAccess then confirms it with anOperationCompleteOk row. It never appeared on anOnDataChange,OnWriteCompleteor write-reply row, which are the rows the Galaxy driver feeds toStatusCodeMap.FromMxStatus. OtOpcUa never calls Suspend/Activate. So a Pending row with non-zero detail, the case this item names, was not observed, and today no Pending row can reachFromMxStatusat all.Two observations from the same capture (no change made):
BadTypeMismatch.Pendingcarries success = -1 (VARIANT_TRUE). MXAccess treats it as accepted-in-progress, not as a failure.Proposed mapping (owner decides; StatusCodeMap not changed):
Uncertain(0x40000000), Warning (any detail) →Uncertain, with the existing once-per-pair warning log kept. Both are "not a failure, not confirmed good". This matches the MXAccess success flag and avoids flagging values Bad on a category MXAccess does not treat as an error. Best fit if a Warning row ever does arrive with a value attached.BadWaitingForInitialData(0x80320000), Warning →Uncertain. More conservative for a data value, but it contradicts success = -1.Badfor both (status quo). Safe, but it hides the distinction if either ever reaches a data row.Leaving open and
blocked: a real Warning row, or a Pending row on a data/write path, is still uncaptured. Producing one probably needs a source that reports degraded-but-usable status, such as an OI server item with a flaky device, or a remote platform mid-startup. This rig has neither.Owner decision 2026-11-13: Pending and Warning (any detail) →
Uncertain(0x40000000), keeping the once-per-pair warning log; detail 8001 →BadTypeMismatch(8018 staysBadUserAccessDenied). Decided on the existing capture evidence, no further live row needed. Unblocked; fix queued.Item 1 + 8001 fixed in
2470f82e(master), per the 2026-11-13 owner decision.Mapping (
StatusCodeMap.FromMxStatus/FromCategory)PendingorWarningrow →Uncertain(0x40000000) for any detail, checked before the detail vocabulary. The once-per-(detail, category) warning log is kept.BadTypeMismatch(vocabulary table, next to 13/18/19/1005). 8018 staysBadUserAccessDeniedvia its SecurityError category, now pinned by a test.Paths
EventPump.ToSnapshot):IsSuccess()is category == Ok, so a Pending (success = -1) or Warning row reaches the map and the value is published Uncertain (was Bad).GatewayGalaxyDataWriter.TranslateReply): result is Uncertain, never Good. The server commits only a Good write result (DriverInstanceActor.IsGoodStatus), so the write is reported as not committed and the node reverts. If MXAccess does commit later, the value arrives as a normal data change. This is deliberately different from the empty-statuses provisional Good, where no verdict arrived at all. Documented in code and indocs/drivers/Galaxy.md.Tests
StatusCodeMapTests(Pending/Warning × detail 0, 1, 2, 1004, 1007, 8001, 2001 → Uncertain; Pending log-once; 8001 → BadTypeMismatch; 8018 → BadUserAccessDenied),EventPumpQualityTests(4 Pending/Warning rows → Uncertain on a Good-quality data change),GatewayGalaxyDataWriterFailClosedTests(4 Pending/Warning write replies → Uncertain; 8001 write reply → BadTypeMismatch). No existing test pinned Bad for Pending/Warning.src: 20 of 21 new cases fail. The one that passes is the 8018 pin, which pins existing behaviour.dotnet build ZB.MOM.WW.OtOpcUa.slnx -c Release: 0 warnings, 0 errors.Not deployed.
Deployed to DEV vd03 + QA vq03/vq04 in
c9640f5con 2026-11-13. Not exercised live: neither tier has a Galaxy driver.Record:
docs/deploy/2026-11-13-vd03-qa-to-c9640f5c.md(c0ba450d).