Skip to content

P8 field fix: SIEBCU first-connect retry, exact two-bit display and false no-report warning - #766

Draft
masarray wants to merge 19 commits into
integration/reporting-engine-p8-20261029from
fix/p8-siebcu-first-connect-bits-display-20261105
Draft

masarray wants to merge 19 commits into
integration/reporting-engine-p8-20261029from
fix/p8-siebcu-first-connect-bits-display-20261105

Conversation

@masarray

@masarray masarray commented Nov 5, 2026

Copy link
Copy Markdown
Owner

P8 field-found SIEBCU regressions — safe consumer-only corrective trial

Base: integration/reporting-engine-p8-20261029 head 37165a0cebd27ae9756810c540426f97b3bfad3a; do not modify P8 PR #763, ARSAS main/RC/stable, or pin a new engine.

Actual operator evidence: 2026-11-05 SIEBCU at 192.16.1.192:102, initial connect logged 10:53:25 and second connect 10:53:35; second succeeded. Smart discovery 1.756s/211 requests; reporting 7/7 exact RCB streams, 7/7 selected values, 14 frame metadata. Nevertheless user-facing USER2.LOCREM shows bits(80, unused=6) and diagnostics mistakenly emit no Report within 3 s after seven streams had actual routed frames.

Source-supported fixes

  1. Initial full discovery MMS association: one retry max for classified transient TCP errors/internal native cancellation when external token remains live, fresh client, bounded cleanup/backoff; no hidden discovery rerun, GI/RCB control, commands or cyclic polling. Explicit failure-kind/elapsed-attempt log. Fail-closed for ACSE rejection, unknown/unreachable error and operator cancellation. Do not assume the actual first failed attempt's precise network cause.
  2. MMS two-bit status display: convert validated bits(80, unused=6) to Bits [10] in operator-only formatter for non-DPC status, not invented Local/Remote. Position-DPC retains Close [10]; malformed padding fails closed. Optional BIT type marker only from explicit BitString metadata.
  3. False 'no Report' warning: source per-RCB decoder-backed frame evidence from the active association rather than fragile UI pulse boolean, preserving independent no-frame RCB alerts and no MMS wire operations.

Gates

Regression added for retry classification/association-only scope, four two-bit codewords, malformed values, DPC vs generic status, type marker and exact-RCB observer decision. CI must pass exact head. Keep PR Draft; a separate uniquely named Windows P8-derived EXE is required before declaring field acceptance. This is not P9 engine integration and does not prove SG7 #707 recovery.

Evidence: docs/audits/P8_SIEBCU_FIRST_CONNECT_BITS_REPORT_20261105.md.

… cancellation in bounded first-connect recovery

masarray commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

CI red triage → targeted repair (2026-11-05)

Failure captured: Build ARSAS #41966366626, commit 377bda2b. Windows compilation succeeded; ARSAS.Tests: 3008 passed, 5 failed, 3013 total. Exact five failures were:

  • 4 parameterizations of M2TypedQualityEvidenceTests.ExistingSharedDbposFormatter_RendersAllFourCodesWithoutQualityLeak: status-display formatter reinterpreted raw Measurement BitString as Bits [00/01/10/11]. This violated the pre-existing raw-evidence contract; previous implementation was overly broad.
  • P72AssociationLifecycleRegressionTests.StaticTrafficProof_WaitsForPropertyChangeInsteadOfFixedSleep: source regression still searched for obsolete firstReportLatency.TotalMilliseconds after the per-RCB frame-proof change.

Actual corrections (no disabled tests):

  • Services/Iec61850ValueFormatter.cs: normalize two-bit raw renderer only for exact Status + .stVal presentation. Preserve raw Measurement, quality, substitute and non-status evidence; retain exact DPC/Dbpos labels.
  • tests/ARSAS.Tests/P72AssociationLifecycleRegressionTests.cs: replace obsolete timer-string assertion with explicit per-RCB decoder-frame proof and no reliance on HasReportStream UI pulse; subscription/cancellation safety checks remain.
  • tests/ARSAS.Tests/Iec61850ValueFormatterTests.cs: add negative fixtures for raw Measurement, non-stVal, quality and substitute contexts.

New exact head: 79789491c1d290aac819a301a578cb29187755ef. Fresh Windows Build run #41967313612 scheduled; do not claim green until exact-head tests complete. PR remains Draft; no engine pin, main, stable, RC or P9 modification.

…wo-bit presentation

Replace corrupted duplicate-tail formatter with baseline-preserving source and small pure presentation policy. Avoid numeric status inference on typed measurement/quality data. Add type-conflict regressions and preflight single-declaration invariant.
… and cached models

Eliminate duplicate retry/teardown loops; preserve separate attempt budgets, enforce explicit cancellation, keep per-device scope, and classify only transient transport failures. Never replay discovery or MMS control writes. Add lifecycle guard.

masarray commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Architecture consolidation after SIEBCU red-build audit (2026-11-05)

Confirmed root of red builds, NOT an IED issue

CI #41966366626 failed 5/3013 tests because a two-bit UI conversion escaped its declared status scope (4 legacy raw-Measurement regressions) and one stale source-string test required an obsolete timer log.

CI #41967313612 then failed during C# parsing: Services/Iec61850ValueFormatter.cs had a truncated char literal at line 99 and a duplicate appended body (734 lines vs the 403-line base). This was a source-mutation integrity failure introduced during prior edits, NOT a failure of IEC 61850 transport or physical SIEBCU.

Durable refactors committed, no vendor exception

  • f9980888e02e987c062496d4dcd46015c8a87247 restores the canonical 403-line formatter source and introduces small pure Iec61850TwoBitStatusPresentation: metadata gates (Status, exact .stVal, compatible/unknown declared MMS type), reusable existing pad-validation parser, raw Measurement and Quality untouched, no guessed Local/Remote. Includes type-conflict regressions. Before the atomic Git-blob commit, formatter uniqueness/source length checks were enforced.
  • c7b7c68c6bf59a53082c09dd7584ea3d5312429e replaces two independently maintained connection retry loops with one association-only executor for Full Discovery and cached model. Respects their distinct attempt budgets, parent cancellation, fresh-client ownership, bounded cleanup/backoff, classified transient retry; no discovery replay, RCB/GI write, control, or hidden process polling. The retry policy still fails closed on explicit protocol rejection or unknown errors. Exact lifecycle contract test updated to assert one executor.

Production safety gate

Current exact head c7b7c68c6bf59a53082c09dd7584ea3d5312429e; Windows Build CI #41969125839 and IO validation #41969125867. Source commits are real; exact-head CI has not yet been declared green.

Next architectural stage should be measured, not speculative: benchmark association connect p50/p95 and first-report latency, per-association allocations on receive dispatch, bounded RCB overflow, and deterministic cancellation/reconnect fixtures in ARIEC P9 before promotion. ARIEC P9 #200, P8 #763, ARSAS main/RC, pinned baseline and stable v1.6.42 remain untouched by this PR. No claim of physical first-click recovery until operator evidence on a validated Windows trial.

masarray commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Cross-repo synchronization: P9 performance/read-mostly registry (2026-11-05)

ARIEC61850 P9 PR #200 now at exact e49968409452334d2402f6ac8dca9fe92abe5a6e, engine CI #41972787534 1,288/1,288 PASS. Engineering change removes per-MMS-Report registry locks and Where().ToArray() by publishing immutable four-RCB membership snapshots only on lifecycle changes. Adds deterministic reset/old-association fixtures and warmed BER performance/allocation telemetry; raw MMS/RptID/DatSet safety gates are not weakened.

Consumer ARSAS PR #766 at c7b7c68c6bf59a53082c09dd7584ea3d5312429e independently passed Windows Build #41969125839 and IO validation #41969125867, but that canonical build uses the pinned baseline engine f75e323e, not staged P9. It is not a P9 Windows trial. Preserve P8 #763, pinned baseline, ARSAS main/RC, stable and SG7 #707 until separately verified physical evidence and uniquely identified integration.

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