Skip to content

fix(scl): gate export-only counter correction on exact live integer type - #374

Open
masarray wants to merge 3 commits into
mainfrom
fix/scl-export-exact-type-evidence
Open

masarray wants to merge 3 commits into
mainfrom
fix/scl-export-exact-type-evidence

Conversation

@masarray

Copy link
Copy Markdown
Owner

Root cause

The existing export-only compatibility correction for MPLS_GGIO1.CBClsCounter rewrites the generated SCL to INS/INT32 based only on object identity, even for an exact Boolean or unknown type. This could misrepresent a different relay/firmware with the same name.

Fix

  • Require one exact ST stVal attribute with TypeDiscoveryStatus=Exact, TypeConfidence=Exact, and SclBType=INT32 from the pinned engine's live TypeSpecification-derived model.
  • Preserve the SCL untouched and emit an explicit skip diagnostic when the evidence is missing, non-integer or ambiguous; reject ambiguous matching live objects.
  • Keep the canonical model read-only, shared-template isolation, and existing save/reopen validation. Add positive and negative regression cases.

Release boundary

Post-release candidate only, not merged as v1.6.40 proof. No engine upgrade, discovery/RCB/reporting changes, new MMS reads, or modification of the published v1.6.40 binary. This is limited to export-time semantics and diagnostics.

Validation

CI is required, followed by a candidate-specific saved-SCL/reopen inspection on the physical reference before treating issue #341 as complete. v1.6.40 stays the accepted stable baseline throughout.

@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: 43893c6023

ℹ️ 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 +60 to +64
string.Equals(attribute.AttributePath, "stVal", StringComparison.Ordinal) &&
string.Equals(attribute.FunctionalConstraint, "ST", StringComparison.Ordinal) &&
string.Equals(attribute.TypeDiscoveryStatus, "Exact", StringComparison.Ordinal) &&
attribute.TypeConfidence == LiveIedDiscoveryConfidenceLevel.Exact &&
string.Equals(attribute.SclBType, "INT32", StringComparison.OrdinalIgnoreCase))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject conflicting exact stVal declarations

When the attribute list contains one qualifying INT32 entry and another exact ST stVal entry declaring BOOLEAN or INT32U, this filter discards the contradictory entry, leaving exactIntegerStatus.Length == 1; the patch then rewrites the saved SCL to INS/INT32 despite ambiguous evidence. Collect all exact ST stVal candidates and require the sole candidate to be INT32 before applying the correction.

AGENTS.md reference: AGENTS.md:L60-L66

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
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