Skip to content

Fix IO FAT live binding and relay fascia - #137

Closed
masarray wants to merge 9 commits into
mainfrom
fix/io-fat-live-binding-and-fascia
Closed

Fix IO FAT live binding and relay fascia#137
masarray wants to merge 9 commits into
mainfrom
fix/io-fat-live-binding-and-fascia

Conversation

@masarray

Copy link
Copy Markdown
Owner

Problem

IO List FAT can complete MMS discovery/association but still abort before monitoring because imported references such as AA1C1F13R4Application/ADD/GGIO1.LocOpnCMDsta.stVal do not match discovery variants that expose the same leaf through a different logical-device/display wrapper. The current FAT IED cards also still present the legacy relay visual rather than the current relay fascia image.

Safety direction

This PR does not weaken the FAT acquisition guard. Exact IEC 61850 references remain first priority. Wrapper-normalized matching is accepted only when one unique non-control signal matches the same LN/DO/DA tail and required functional constraint. Duplicate tails across Logical Devices remain ambiguous and block automatic acquisition.

Implemented so far

  • Normalize nested Application/ADD/... and live discovery wrapper variants in the secondary FAT binding path.
  • Preserve exact matching first.
  • Require the imported functional constraint for automatic signal selection.
  • Add Tangguh AA1C1F13R4 regression coverage for ADD/GGIO1.LocOpnCMDsta.stVal.
  • Add negative regression coverage for duplicate logical-device tails and FC mismatch.

Follow-up in this PR

  • Wire the IO FAT IED card directly to the current PNG relay fascia and retain a small state indicator.
  • Add UI contract regression.
  • Validate whether native discovery is dropping an embedded MMS logical-device segment and harden it if required for actual polling correctness.

Invariant

A FAT session may recover from harmless display/domain wrapper differences, but it must never guess between multiple IEC 61850 objects or cross a functional constraint.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d99fb10dc9

ℹ️ 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".

Comment on lines +292 to +294
var lastSlash = normalized.LastIndexOf('/');
if (lastSlash >= 0 && lastSlash < normalized.Length - 1)
return normalized[(lastSlash + 1)..].TrimStart('/');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve logical-device identity during normalization

When an import references ADD/GGIO1.LocOpnCMDsta.stVal but discovery contains only CTRL/GGIO1.LocOpnCMDsta.stVal, this strips both references to the same leaf. Since both binding services accept a single normalized candidate, they will select the CTRL signal instead of reporting the missing ADD signal, allowing FAT evidence to be captured from the wrong logical device. Preserve or explicitly map the logical-device components rather than dropping everything before the final slash.

Useful? React with 👍 / 👎.

Comment on lines +92 to +93
SourceIecReference = "ADD/GGIO1.LocOpnCMDsta",
EventLogSearchReference = "ADD/GGIO1.LocOpnCMDsta",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid exact references in normalized-fallback fixtures

These fixture fields cause ImportedReferences to append .stVal and produce the exact reference ADD/GGIO1.LocOpnCMDsta.stVal. Consequently, the canonical-domain test returns BoundExact before reaching normalization, and the two-logical-device test likewise binds the single exact ADD candidate rather than reporting ambiguity, so both new assertions fail whenever this test class runs. Remove the exact synthesized reference or update the scenarios and expectations to reflect exact-match precedence.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Closing as superseded rather than merging an old FAT implementation into the current release line.

The original goals are now covered by newer, validated work:

Current main therefore contains materially newer safety and multi-IED behavior than this branch. In particular, merging #137 now would risk reintroducing the older tail-normalization/live-binding implementation and losing later regression protections. ARSAS v1.6.24 has been built and published from the newer path, so this PR is intentionally closed without merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant