Add dedicated IO List Testing import and binding workspace - #111
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eab99602fa
ℹ️ 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".
| var ipMatches = devices.Where(device => | ||
| device.IpAddress.Equals(plan.IpAddress, StringComparison.OrdinalIgnoreCase)).ToList(); | ||
| return ipMatches.Count == 1 ? ipMatches[0] : null; |
There was a problem hiding this comment.
Require matching IED identity before binding by IP
When the imported IP uniquely matches a workspace device whose IED name differs, this fallback binds that device anyway. Signals with unprefixed references can subsequently match exactly or through telegram normalization, causing the FAT preview to display values from a different IED; an identity mismatch should instead block automatic binding or require explicit confirmation.
Useful? React with 👍 / 👎.
| var sourceRow = ParseInt(Get(values, "SourceRow"), row.RowNumber); | ||
| var onRaw = ParseInt(Get(values, "ExpectedONRaw"), 1); | ||
| var offRaw = ParseInt(Get(values, "ExpectedOFFRaw"), 0); |
There was a problem hiding this comment.
Reject malformed expected-state cells instead of defaulting
When either required ExpectedONRaw or ExpectedOFFRaw cell is blank or non-numeric, these defaults silently turn it into 1 or 0. The validator then sees distinct valid binary values and accepts the workbook, so a malformed or accidentally inverted test definition is imported instead of being rejected; parsing failures should produce findings before constructing the point.
Useful? React with 👍 / 👎.
| private static XDocument LoadXml(ZipArchive archive, string entryPath) | ||
| { | ||
| var entry = archive.GetEntry(entryPath) ?? throw new InvalidDataException($"XLSX entry '{entryPath}' is missing."); | ||
| using var stream = entry.Open(); | ||
| return XDocument.Load(stream, LoadOptions.None); |
There was a problem hiding this comment.
Bound decompressed XLSX entries before loading XML
For a highly compressed or malicious workbook, the 50 MB check only limits the ZIP file itself, while XDocument.Load eagerly expands each entry without an uncompressed-size or character limit. A small XLSX can therefore allocate an arbitrarily large XML tree and exhaust the application's memory; validate entry lengths and/or parse through a size-limited streaming reader before materialization.
Useful? React with 👍 / 👎.
Purpose
Implement the first usable IO List Testing phase as a dedicated FAT workspace without mixing the customer-facing test flow into the existing protocol workstation.
Imported FAT workflow
IO List Testinglauncher to the engineering workstation headerARSAS-FAT-IO-1.0directly from theARSAS_SIGNAL_IMPORTXLSX sheetIoListTestingWindowXLSX import safety
Live binding preview
Evidence foundation
Current boundary
This phase provides import, validation, IED-scoped workspace navigation and live-binding preview. FAT execution remains intentionally locked until the next tranche connects the point-update controller, session lifecycle and durable append-only evidence journal.
There is no IEC 61850 command or configuration write in this PR.
Regression coverage
Validation requested
The complete Windows solution build and
ARSAS.Testsworkflow must compile the WPF launcher/window and execute the full regression suite before this draft is promoted.