Repository navigation
feat(IEC-10x): M2 physical point identity, GI isolation and lossless spontaneous SOE facts - #41
Conversation
…ous SOE facts and raw provenance
| foreach (var direction in new[] { FrameDirection.MasterToSlave, FrameDirection.Unknown }) { | ||
| var e = new Iec103MasterEvidenceEvent { | ||
| Direction = direction, ProtocolMode = Iec60870ProtocolMode.Iec101, | ||
| TypeId = 31, InformationObjectAddress = 1, CauseOfTransmission = 3 | ||
| }; | ||
| Assert.False(Iec10xObservationIdentity.IsReceivedDigitalEvent(e)); | ||
| } |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2960f0f80
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { | ||
| if (protocol is not (Iec60870ProtocolMode.Iec101 or Iec60870ProtocolMode.Iec104)) | ||
| throw new ArgumentOutOfRangeException(nameof(protocol)); | ||
| if (ioa is < 0 or > 0xFFFFFF) throw new ArgumentOutOfRangeException(nameof(ioa)); |
There was a problem hiding this comment.
Handle out-of-range decoded IOAs without throwing on the UI thread
A received SQ=1 ASDU with a three-byte base IOA of 0xFFFFFF and two objects causes Iec10xAsduDecoder.DecodeObjects to produce 0x1000000 for the second object. That observation reaches UpdateValueAndEventViews → BuildValueKey, where this new validation throws. The dispatcher timer calls FlushUiQueues without an exception boundary, so malformed relay traffic can now terminate the desktop application instead of remaining inspectable evidence. Reject or diagnose the invalid address before constructing the value key, without allowing the exception to escape into WPF.
AGENTS.md reference: AGENTS.md:L255-L257
Useful? React with 👍 / 👎.
| var observed = BuildGiKey(item.CommonAddressNumber, item.InformationObjectAddress.Value); | ||
| if (_giExpectedValueKeys.Contains(observed)) | ||
| _giReceivedValueKeys.Add(observed); |
There was a problem hiding this comment.
Credit GI coverage only to compatible expected profile points
With a profile containing an exact CA=105/IOA=77/Type=31 point and a wildcard-CA IOA=77/Type=1 point, a Type=1 observation from CA=105 resolves to the wildcard point, but this code credits the exact CA=105 key instead. Thus the Type=31 point is reported as received despite never being observed, while the compatible wildcard point remains missing. The caller's ioaPoint is not null check only establishes that some profile entry matches; it does not validate the expected entry selected here. Mark coverage using the compatible profile entry or entries rather than selecting an expected key solely by the observed CA and IOA.
Useful? React with 👍 / 👎.
Field problem and baseline
Starts from merged M1
668836385f8a4f4af59776518ed851178c1c9c57. Fixes two forensic correctness gaps: Values previously keyed only by IOA (mixing CA/Link A/B), and Active IEC-101/104 SOE discarded first/repeated spontaneous digital evidence without a detected state change.Delivered (17 files, one CI-triggering PR)
Iec10xObservationIdentity.ValueKey(protocol, physical channel, CA, IOA); distinct known/unknown CA; no inferred alias; original physical provenance optional on evidence.Non-goals / not yet claimed
This is a substantial M2 source identity + SOE checkpoint, not full M2 transaction correlation / durable
.ariecrecord graph, complete report parity, or physical FAT. No claim of real SICAM/ETERA testing or IEC-Test total parity. Multi-SV stream belongs to ARStack61850, not ARIEC60870.Merge gates
Release build, 19 protocol smoke, xUnit, WPF GUI smoke/Windows package, CodeQL, dependency review, repository hygiene on one exact head; merge only when green. No CI loops or blanket master overwrite.