Repository navigation
P5C: save discovered canonical IED model as SCL - #114
Conversation
There was a problem hiding this comment.
💡 Codex Review
arstack61850/include/ariec61850/scl/live_model_projection.hpp
Lines 274 to 275 in e0fffd7
When discovery records a top-level FC point without any child DA, object.attributes is intentionally empty; this nested loop then contributes nothing for that object. If another object supplies at least one model entry, validation succeeds and the generated DataTypeTemplates silently omit the empty object, so Save SCL produces an incomplete IED model instead of failing closed. Reject such unresolved objects or preserve them through an explicit typed representation.
AGENTS.md reference: AGENTS.md:L298-L300
arstack61850/include/ariec61850/scl/live_model_projection.hpp
Lines 438 to 443 in e0fffd7
When an RCB deep read succeeds, MmsLiveReportControl contains trigger_options and optional_fields, but this projection copies neither field while still declaring the report successfully reconstructed. The exporter consequently emits no TrgOps/OptFields, and the self-comparison cannot detect the loss because the expected SclReportControl has already discarded them; reopening the saved SCL can therefore change which events trigger reports and which report fields clients expect.
AGENTS.md reference: AGENTS.md:L310-L311
For large discovered IEDs, this call performs the complete nested model traversal, map construction, and numerous string/vector allocations synchronously from the QML invocation before busy_ is even set; only serialization is queued to ioPool_. This can freeze the Browser during Save SCL and cannot be cancelled while projection is running, so snapshot copying and projection should execute in the bounded worker as well.
AGENTS.md reference: AGENTS.md:L88-L92
When a discovered SGCB lacks valid ActSG/NumOfSG evidence, the warning added above is stored in result.warnings, but this assignment replaces the entire vector with document.warnings. The setting control is therefore omitted without the promised explicit loss diagnostic, leaving users with only the generic vendor-metadata warning.
AGENTS.md reference: AGENTS.md:L307-L311
If reparsing or semantic comparison fails, the destination has already been atomically committed and may have replaced a previously valid engineering file even though the UI reports that Save SCL was rejected. This occurs, for example, for an RCB whose live binding status is ReadFailed: projection records unresolved, serialization omits datSet, reparsing yields not_specified, and the comparison fails only after replacement. Perform round-trip validation on temporary output before committing it to the requested path.
AGENTS.md reference: AGENTS.md:L310-L311
ℹ️ 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".
Implements P5C from #111 from immutable P5B baseline
e455608bef1cca4c35d3a04bde51f4f295c4c9ab.Workflow
Save SCLfor Live Discovery authority, including offline after Disconnect.Architecture
MmsLiveModelDocument -> SclDocumentprojection inlive_model_projection.hppSclExporter; no parallel XML exporter is introducedFail-closed rules
QA
ied_discovery_scl_export_qaproves Live Discovery -> disconnect -> Save IID -> re-open -> canonical Browser contextRegression boundary
Draft until exact-head CI is fully green.