Skip to content

Phase 4D-D2: add smart Dynamic RCB reporting - #32

Merged
masarray merged 4 commits into
mainfrom
agent/phase-4d-d2-dynamic-rcb-live-trial
Aug 10, 2026
Merged

masarray merged 4 commits into
mainfrom
agent/phase-4d-d2-dynamic-rcb-live-trial

Conversation

@masarray

@masarray masarray commented Aug 10, 2026 •

Copy link
Copy Markdown
Owner

Scope

Add a guarded one-command laboratory harness for Smart Dynamic RCB reporting, now integrated directly on current main after Phase 4C live discovery and Phase 4D-D1 Dynamic DataSet support.

Smart dynamic reporting

  • connect through the built-in TCP MMS transport and perform bounded live discovery;
  • rank only empty, disabled, unreserved RCB slots;
  • recursively project bounded scalar ST/MX leaves from live Logical-Node type trees;
  • create and verify one uniquely named Dynamic DataSet;
  • convert canonical LD/LN.DataSet references to the RCB wire value LD/LN$DataSet;
  • bind, reserve when required, enable, optionally request GI, and drain reports;
  • accept InformationReport variable-access specifications in both listOfVariable [0] and variableListName [1] forms;
  • preserve the exact MMS DataAccessError code on failed writes;
  • disable, unbind, release owned reservations, and delete only the DataSet created by the run.

Default execution is read-only. Armed execution requires the exact token IEC61850-LAB-DYNAMIC-RCB, performs one bounded lifecycle, and never retries mutation automatically on another RCB.

Root cause addressed

The original live trial selected only shallow type members, wrote the canonical directory reference into DatSet, and decoded only the list-of-variable InformationReport form. Real external IEC 61850 client evidence required recursive member selection, the $ RCB reference form, and variable-list-name report decoding.

Validation

  • local MSVC full build and CTest: 22/22 passed;
  • dedicated Dynamic RCB build and CTest: 2/2 passed;
  • isolated-lab IED lifecycle: define, enable, one decoded report, clean disable/unbind/delete, and final trial pass;
  • post-run RCB state verified as DatSet empty and RptEna=false;
  • terminal/JSON evidence remains local and is not committed.

Hosted CI never connects to or mutates an IED. Physical success is interoperability evidence for the selected lab profile, not IEC 61850 conformance certification.

@masarray masarray changed the title Phase 4D-D2: add guarded smart Dynamic RCB live trial Phase 4D-D2: add smart Dynamic RCB reporting Aug 10, 2026
@masarray
masarray changed the base branch from agent/phase-4c-tcp-live-discovery to main August 10, 2026 22:00
@masarray
masarray marked this pull request as ready for review August 10, 2026 22:00
@masarray
masarray merged commit ccba9b9 into main Aug 10, 2026
14 checks passed

@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: fdf0691f73

ℹ️ 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 +232 to +234
if (candidate != nullptr) {
try { require_write_success(association, *candidate, "RptEna", mms::MmsDataValue::boolean(false)); }
catch (const std::exception& exception) { std::cerr << "CLEANUP warning: RptEna=false failed: " << exception.what() << '\n'; }

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 Gate cleanup writes on mutations owned by this run

In the armed harness, if DataSet creation fails before subscription exists, or MmsReportSubscriptionRuntime::start() re-probes the RCB and rejects it because another session claimed it after discovery, this block still unconditionally writes RptEna=false, Resv=false, and an empty DatSet. The failure path can therefore disable and unbind an RCB owned by another client even though this run never modified it, contradicting the harness's safety contract; track which attributes this run successfully changed and clean up only those.

Useful? React with 👍 / 👎.

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