Skip to content

hotfix: make physical-proven Smart Discovery the only production build route - #347

Merged
masarray merged 13 commits into
mainfrom
hotfix/production-smart-route-parity
Sep 20, 2026
Merged

masarray merged 13 commits into
mainfrom
hotfix/production-smart-route-parity

Conversation

@masarray

Copy link
Copy Markdown
Owner

Physical release regression root cause

v1.6.39 is physically rejected on relay AA1E1F06R4.

Observed release diagnostic:

  • app: 1.6.39+638d5b1fbaf757041019bcfb6172a8b6766355a8
  • engine: 648124097621046f5f127ceb1cf853fea54db730
  • association ready -> scan complete: ~31.622 s
  • static membership: 58/58 (22 Analog + 36 Digital)
  • cyclic MMS process polling: 0
  • actual report-backed runtime points: 23/58
  • repeated REPORT_VALUE_REJECTED: BIT STRING report values were treated as Boolean on Digital status points

Root cause

The R7 physical-good artifact and the production release did not compile the same effective program.

Directory.Build.targets enabled the physical-proven Smart Discovery route only when:

  • GITHUB_WORKFLOW == "SCL Interoperability R7 Build", or
  • GITHUB_WORKFLOW == "Smart Discovery Field Capture Build", or
  • SmartDiscoveryProductionPromoted == true

The production switch remained false. Therefore Release Windows, installer builds and normal local builds compiled the legacy DiscoverSignalsAsync path while R7 silently mutated NativeIec61850Client.cs before compile.

This explains why identical repository/engine SHAs still produced different physical behavior.

Hotfix policy

This PR does not change the Smart Discovery algorithm or engine.

It:

  1. tracks the exact physical-proven R7 route in Services/NativeIec61850Client.cs;
  2. removes workflow-name-dependent discovery compilation;
  3. turns the former build-time patch script into a fail-closed verifier;
  4. makes R7 verify production parity instead of creating a special binary;
  5. makes installer/release packaging refuse legacy/incomplete discovery source;
  6. records v1.6.39 as physically rejected evidence.

Engine remains:
648124097621046f5f127ceb1cf853fea54db730

No release from this PR

Do not publish another stable release yet.

Required physical acceptance from artifacts produced by this PR:

  • 58/58 static members
  • Analog 22/22
  • Digital 36/36
  • report-backed 58/58
  • cyclic MMS process polling 0
  • no BIT STRING-as-Boolean rejection burst
  • discovery timing/request shape back to the accepted Smart Discovery behavior
  • test both portable and installer candidates

Only after physical acceptance may a separate v1.6.40 release-prep be created.

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

ℹ️ 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 thread Directory.Build.targets
Condition="'$(MSBuildProjectName)' == 'ArIED61850Tester'">
<Message Importance="High"
Text="Verifying tracked physical-proven Smart Discovery production route." />
<Exec Command="powershell -NoProfile -ExecutionPolicy Bypass -File &quot;$(MSBuildProjectDirectory)\scripts\enable-smart-discovery-capture.ps1&quot; -VerifyOnly" />

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 Select the platform-appropriate PowerShell executable

On non-Windows hosts, every application build now runs this unconditional target but invokes Windows PowerShell by the powershell name, which is normally unavailable where PowerShell Core is exposed as pwsh; this breaks Linux/macOS cross-target builds before compilation. ArIED61850Tester.csproj already defines ArIec61850PowerShell based on $(OS), so use that property here as the existing lock-validation target does.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Root cause confirmed: v1.6.39 release compiled the wrong discovery route

Physical diagnostic from AA1E1F06R4 proves the stable v1.6.39 package is rejected:

  • app commit: 638d5b1
  • engine: 648124097621046f5f127ceb1cf853fea54db730
  • association-ready -> scan-complete: ~31.622 s
  • static membership 58/58, Analog 22/22, Digital 36/36
  • cyclic MMS process polling 0
  • actual report-backed runtime points only 23/58
  • repeated BIT STRING-as-Boolean REPORT_VALUE_REJECTED burst

Confirmed root cause is build-route divergence, not engine SHA drift:

  • R7/Field Capture builds used Directory.Build.targets to mutate NativeIec61850Client.cs before compilation and install the Smart Discovery route.
  • Release Windows / installer / normal builds did not, because SmartDiscoveryProductionPromoted remained false.
  • Therefore the same repository + engine SHA produced different effective programs.

Hotfix head now tracks the exact physical-proven R7 mutations in production source and removes workflow-name-dependent compilation.

Policy from this PR:

  • no stable release;
  • R7 portable and installer artifacts from this exact head must both be physically retested;
  • acceptance requires 58/58 static, 22/22 Analog, 36/36 Digital, 58/58 report-backed, polling 0, no BIT STRING-as-Boolean rejection burst;
  • only after physical acceptance prepare v1.6.40.

v1.6.39 physical rejection is committed as evidence/v1.6.39-physical-rejection.json.

@masarray
masarray merged commit 3506073 into main Sep 20, 2026
13 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