Skip to content

fix(v1.6.36): real IED process feedback and smooth analyzers - #312

Merged
masarray merged 8 commits into
trial/scl-golden-wire-v1636from
fix/v1636-real-ied-feedback-smooth-analyzers
Sep 16, 2026
Merged

masarray merged 8 commits into
trial/scl-golden-wire-v1636from
fix/v1636-real-ied-feedback-smooth-analyzers

Conversation

@masarray

@masarray masarray commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

Correct v1.6.36 baseline

This PR is based on the field-proven trial/scl-golden-wire-v1636 line, not stale main. It preserves the trusted-SCL/static-report startup path that already produced the physical 58/58 initial image.

Process-state authority fix

  • Remove command-path injection of control feedback into monitored process stVal.
  • Remove the command window overwrite of CurrentValue from command results.
  • Remove all command-derived report correlation/suppression state (CommandFeedbackValue, command guard/deadline state, AwaitingCommandReportEdge, and related helpers).
  • A real IED report is never suppressed, rewritten, or treated as stale merely because a previous Open/Close command succeeded.
  • Command lifecycle remains separate from process-state authority. Live Monitor and SOE follow independent IED acquisition/report evidence.

Analyzer presentation

  • Add lightweight presentation-only time-based easing for Phasor and Harmonics.
  • Use shortest-angle phasor interpolation and first-sample/topology snap.
  • Do not alter raw/native engineering values, history, evidence, or export data.

Combined v1.6.36 ARIEC convergence

PR #314 was integrated on this branch and is intentionally preserved:

  • ARIEC pin 0023ef9a4373855497464ed3979e359c4041c95d from ARIEC PR Diagnose v1.6.20 release publication #132 / CI #603.
  • Full structured fieldProvenBaseline remains preserved in engines/ARIEC61850.lock.json.
  • Physical-trial contract covers receiver-before-write, one-shot GI, 58/58 initial image, fail-closed cleanup, and independent IED process-state authority.

No temporary patch workflow remains in the final tree.

Regression protection

  • Source regression tests reject any reintroduction of the synthetic control-feedback injector or command-derived report suppression state.
  • The reconnect/report-rearm regression now explicitly rejects AwaitingCommandReportEdge instead of requiring the removed synthetic-command state.
  • Presentation easing math has cadence/angle-wrap regression coverage.

Exact candidate

Current exact head: f1700ccc3ccf41895993ab827cb4c9e5fa8143e9.

The previous exact-head installer run compiled successfully and executed 1137 tests; 1136 passed and the sole failure was a stale assertion that still required the intentionally removed AwaitingCommandReportEdge state. Commit f1700ccc3ccf41895993ab827cb4c9e5fa8143e9 updates that regression contract. Full Build, IO/SV/COMTRADE validation, and Windows installer workflows are rerunning against this exact SHA.

Physical duplicate-SOE closure will be claimed only after the resulting installer is exercised against the real IED.

Supersedes PR #311, whose original branch was based on stale main.

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

ℹ️ 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 +190 to +194
CommandStage = result.IsSuccess && !TestMode ? "Command accepted" : result.Stage;
CommandStatus = BuildCommandResultText(result);
if (!string.IsNullOrWhiteSpace(result.FeedbackValue) && result.FeedbackValue != "-")
CurrentValue = result.FeedbackValue;
if (result.IsSuccess && !TestMode)
{
CommandStatus += " Command accepted by the IEC 61850 control service. Waiting for independent IED process feedback; monitored stVal is not changed from the command path.";

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 the no-command preflight result

When the live preflight finds the process already at the requested state, NativeIec61850Client.ControlAlreadyAtRequestedState returns IsSuccess = true, ServiceAccepted = false, and CompletionState = "NotSent". This branch nevertheless replaces its accurate “Already at requested state” stage with “Command accepted” and asserts that the control service accepted a command, misleading operators even though no SBO/Operate request was sent. Gate this wording on actual service acceptance rather than general success.

AGENTS.md reference: AGENTS.md:L143-L153

Useful? React with 👍 / 👎.

Comment on lines +63 to +66
_smoothedVoltageVectors = SmoothVectors(_smoothedVoltageVectors, voltageVectors, elapsedMilliseconds);
_smoothedCurrentVectors = SmoothVectors(_smoothedCurrentVectors, currentVectors, elapsedMilliseconds);
_voltagePanel = PreparePanel(_smoothedVoltageVectors);
_currentPanel = PreparePanel(_smoothedCurrentVectors);

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 Drive easing to the final analysis sample

When consecutive cursor results have the same vector topology, this replaces the authoritative target with one exponentially blended sample, but no animation/render callback invokes SmoothVectors again. After the final native request completes, ExecuteAnalysisRequestAsync stops the composition pump, so the displayed magnitudes, angles, and legend values remain permanently between the previous and final DFT frames; ComtradeHarmonicsWorkstationView.ShowSpectra has the same behavior. Preserve the exact target and continue presentation frames until it is committed, or snap the final scrub result.

AGENTS.md reference: AGENTS.md:L94-L106

Useful? React with 👍 / 👎.

All exact-head software gates passed. Preserve PR #312 runtime/control/analyzer work and integrate the green ARIEC convergence pin plus corrected physical-trial contract.

Copy link
Copy Markdown
Owner Author

Final combined requalification PASS on head e442ecf3ae5593581a14fdfd4677581612c68259 after PR #314 was merged into this branch: Build #2825 PASS, installer #978 PASS, IO #1367 PASS, SV #1807 PASS, COMTRADE #225 PASS. Proceeding with user-authorized merge into trial/scl-golden-wire-v1636.

@masarray
masarray force-pushed the fix/v1636-real-ied-feedback-smooth-analyzers branch from c8d7fd1 to 7f6a63a Compare September 16, 2026 07:37
@masarray
masarray merged commit 4f5c274 into trial/scl-golden-wire-v1636 Sep 16, 2026
5 checks passed
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