Skip to content

P7.6C #446: IEC 61850 report continuity evidence (SqNum/segmentation/EntryID) - #484

Closed
masarray wants to merge 6 commits into
fix/446-p7-6b-canonical-member-ordinal-parityfrom
feat/446-p7-6c-iec-report-continuity-evidence
Closed

masarray wants to merge 6 commits into
fix/446-p7-6b-canonical-member-ordinal-parityfrom
feat/446-p7-6c-iec-report-continuity-evidence

Conversation

@masarray

@masarray masarray commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Exact HEAD CI & artifact status — 2026-10-08

Baseline and ownership

Stacked on P7.6B PR #483 at exact 5a05ab2187e04aaf70106ef5c59a0c625503aaef, physically tested on separate Discovery IP/Open SCD sessions with matching semantic fingerprint and independent BRCB/URCB report traffic. ARIEC61850 remains immutably pinned at 352c81e6a798635c6addcee0683235ca87ad416d.

Scope: consumer-side report continuity evidence only. Files owned in this draft: Services/Iec61850MonitorRuntime.cs (diagnostic integration only), Services/Iec61850ReportContinuityInspector.cs (pure, per-stream state machine), new tests/ARSAS.Tests/ReportContinuityP76CTests.cs. No engine modifications, RCB configuration, GI writes, process updates, static DataSet selection, polling, command controls or reordering/replay heuristics.

Standard context / field motivation

IEC 61850-7-2 buffered reporting report SqNum is a 16-bit unsigned counter per BRCB with increment and maximum rollover; first report after enabling is sequence 0. Segmented reports share SqNum and start SubSqNum 0, then increment for continuation; BufOvfl indicates possible loss, while EntryID is opaque BRCB resync identity and ConfRev changes require schema revalidation. A later GI report or different EntryID cannot be treated as proof of harmless SqNum reset.

Operator field pair shows observed early Rpt_ind01: 4→1 (Open SCD) and Rpt_ind02: 3→1 (Discovery). Those remain explicit unverified discontinuity warnings. No claim of lost SOE entries or harmless reset is made absent RptEna lifecycle/EntryID/GI evidence.

Implementation

  • Fix old naive IsExpectedReportSequence which accepted any current==0 as rollover; now only 65535→0 is recognized as 16-bit wrap.
  • Separate association/exact RCB stream continuity state; first observed nonzero sequence does not imply packet loss; distinguish duplicate/replay, backward/reset/replay, forward gap without asserting actual event loss.
  • Segmented report integrity: first SubSqNum 0, continuation same SqNum and next sub number, missing completion/sequence and inconsistent optional field diagnostics.
  • BufOvfl, ConfRev drift and opaque EntryID presence/change are recorded as evidence, not value-plane changes. No timestamp/quality rewriting, no forced GI, no cyclic MMS polling fallback.
  • Existing report-stream state lifecycle remains cleared on monitoring restart, disconnect and reconnect. No stale-session continuity attribution.
  • Synthetic tests cover standard wrap, invalid 4→0, physical 4→1 / 3→1, out-of-range metadata, GI-unproven states, segmentation, BufOvfl+ConfRev and per-session isolation.

Gates

CodeCommitted; CI pending and physical continuity stress test still PhysicalPending. Maintain draft, do not merge/release until exact-head CI and field continuity scenarios are qualified. Parent #446. Other workstreams should coordinate file ownership before editing Services/Iec61850MonitorRuntime.cs.

Copy link
Copy Markdown
Owner Author

D17 evidence-gated historical reconciliation against protected integrated RC 817c3910e8223fa2ac531a4426ada5d2d4bbbe50 (no new merge to main).

  • Current PR HEAD verified unchanged 397d7836e5b071d4f3c6b375f9c51879c58eeb48. GitHub compare HEAD→RC: behind=0, so the full historical commit ancestry already exists in the canonical RC. All 3 original changed paths remain present.
  • Original regression suite tests/ARSAS.Tests/ReportContinuityP76CTests.cs (12 tests, 43 assertions) has an identical Git blob SHA at PR HEAD and RC, not merely a matching filename; historical positive/negative assertions therefore remain intact. 1/3 changed blobs match byte-for-byte; other production sources have evolved and must not be reported byte-identical.
  • Source-level semantic mapping of evolved files: Iec61850ReportContinuityInspector.Observe still holds per-RCB/association SqNum & SubSqNum evidence, 16-bit rollover, nonzero initial SqNum, BufOvfl/ConfRev and opaque EntryID warnings. Runtime still uses ReportStreams and Observe without modifying report processing/RCB/write/polling. Newer source additionally guards raw wire OptFlds provenance.
  • Existing exact-RC-SHA Windows build, SCL R7 and reference guard are SUCCESS. No workflow has been rerun for this metadata-only reconciliation. Physical IEC 61850/BRCB/GI FAT, independent #520, overarching #446, and release gates are NOT certified by this closure.

Decision: close historical stacked PR as integrated into RC ancestry / superseded as an independent merge unit. Preserve full GitHub discussion and original immutable branch. Never cherry-pick again, do not mutate RC, stable v1.6.42, ARIEC engine pin, #753–#756 or parallel GUI/Write/SG7 lanes.

@masarray masarray closed this Oct 26, 2026
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