FAT: smart IEC 61850 binding + COMTRADE/time-sync evidence - #140
Conversation
|
Validation complete on head
Remaining acceptance item is intentionally hardware-only: run the branch against the target FAT relay/network to verify the actual MMS association, report acquisition and IEC 61850 fault-record transfer for the installed IED firmware. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c6d5e9521
ℹ️ 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".
| public string EvidenceKind { get; init; } = string.Empty; | ||
| public string ArtifactName { get; init; } = string.Empty; | ||
| public string ArtifactPath { get; init; } = string.Empty; | ||
| public string ArtifactSha256 { get; init; } = string.Empty; | ||
| public long ArtifactBytes { get; init; } |
There was a problem hiding this comment.
Preserve the hash input for existing evidence journals
Adding these serialized properties invalidates every journal created by an earlier release: IoTestEvidenceJournal.Verify deserializes each old entry and then reserializes it to recompute the hash, at which point these initialized empty/default fields are emitted even though they were absent from the original hash input. Consequently, opening or exporting a workspace with pre-upgrade evidence reports a hash mismatch; the verifier needs a versioned/legacy hash representation rather than relying on defaults.
Useful? React with 👍 / 👎.
| var syncSignal = IoFatSupplementalEvidenceService.FindTimeSyncSignal(device); | ||
| if (syncSignal != null) | ||
| { | ||
| for (var attempt = 0; attempt < 8 && !HasLiveValue(syncSignal.Value); attempt++) | ||
| await Task.Delay(175).ConfigureAwait(true); |
There was a problem hiding this comment.
Wait for the monitored time-sync point instead of the signal
On the saved-model fast-reconnect path, cached SignalDefinition instances start with Value = "-", while monitoring publishes live values into device.Points and does not copy them back into the signal. This loop therefore waits on a value that never changes and CaptureTimeSync subsequently reads the same stale signal, recording PENDING even when the newly armed time-sync point has a valid live status; resolve and inspect the corresponding monitored point instead.
Useful? React with 👍 / 👎.
| return device.Signals | ||
| .Where(signal => !signal.IsControlSignal && !string.IsNullOrWhiteSpace(signal.ObjectReference)) | ||
| .Select(signal => new { Signal = signal, Score = TimeSyncScore(signal) }) | ||
| .Where(item => item.Score > 0) | ||
| .OrderByDescending(item => item.Score) | ||
| .ThenBy(item => item.Signal.ObjectReference, StringComparer.OrdinalIgnoreCase) | ||
| .Select(item => item.Signal) |
There was a problem hiding this comment.
Restrict time-sync selection to unique status signals
When an IED exposes both a setting such as TimeSyncEnable.setVal and a synchronization-status object, this ranking can select the setting solely because TimeSync scores higher, without checking ST/MX runtime eligibility or requiring a unique best status candidate. CaptureTimeSync then maps values such as on or active to PASS, so configuration enablement can be journaled as proof that the clock is synchronized; filter to readable status leaves and withhold automatic evidence when the best match is ambiguous.
Useful? React with 👍 / 👎.
|
Remote COMTRADE FAT semantics are now implemented and validated at head
Physical IED bench validation is still required before claiming actual |
Enable independent per-IED FAT connection, discovery, and report monitoring while preserving single-active, device-filtered evidence journaling. Replace the global preparation lock with per-IED state, target-scoped BindIed refreshes, independent Connect/Prepare/Refresh UX and card progress, and continuation-safe connection scope. Keep P0 matching fail-closed and preserve completed evidence. Validated by IO #140, SV #176, full 154-test Build ARSAS #972, portable publish, and smoke test.
Summary
$ST$/$MX$, IED-prefixed domains, DIGSIApplicationwrappers, and verified functional-group/LN display hierarchyFileDirectorydiscovery of a supported remote COMTRADE/fault record as IED-level File Service FAT PASS; downloading the file is not required for this browse-service evidenceLastModifiedUtcand persist its exact COMTRADE filename(s), remote path, completeness, relay modified time, source, file count, and known size per IED.evidence.jsonlchain and retain stronger SHA-256 local-artifact evidence when the operator also downloads a recordSafety / behavior
FileDirectory; it does not claim thatFileOpen/FileRead/FileClosesucceededValidation note
CI validates build, regression, report, persistence, packaging, and application smoke paths. Live MMS association and actual relay
FileOpen/FileReadtransfer still require an IED/network test at the FAT bench before claiming physical file-download interoperability.