Skip to content

P9: four-RCB initial report registration race + bounded per-RCB delivery - #200

Draft
masarray wants to merge 7 commits into
stagingfrom
feature/p9-multircb-activation-bounded-dispatch-20261031
Draft

masarray wants to merge 7 commits into
stagingfrom
feature/p9-multircb-activation-bounded-dispatch-20261031

Conversation

@masarray

Copy link
Copy Markdown
Owner

P9 — Multi-RCB receive correctness and bounded delivery (single integrated milestone)

Branch base: ARIEC staging ae1ce23dbc181c2a17aef20802f7517892fe4264. No ARSAS main/RC, stable v1.6.42, baseline engine lock or P8 #763 changed.

Rooted source defects corrected

  1. Initial-image timing race: previous StartPersistentReportMonitorAsync issued RptEna, awaited post-enable readback and sent GI before registering the monitor. During those awaits, another active RCB receive slice could drain the canonical queue, quarantining the first report for the not-yet-registered RCB. Register after successful RptEna and before readback/GI, with unregister on subsequent exception.
  2. Unbounded per-RCB delivery: the shared raw InformationReport FIFO was bounded but each mapped PendingReports queue had no cap. Add per-monitor bounded, nonblocking ordered admission with sticky overflow/continuity-unverified evidence propagated to receive-slice summaries. A saturated RCB does not prevent another RCB's valid delivery.

Deterministic test coverage

Project-owned synthetic BER/ISO-presentation MMS InformationReports, four independent SG7-style RptID/DatSet streams; full/abbreviated DatSet, actual decoder + target selection + member projection + pending delivery, burst FIFO ordering, identity conflicts quarantined, zero-frame active target stays awaiting, slow one-RCB saturation with unaffected peers.

Explicit limits and promotion gates

  • These are code-level real defects, NOT a proven explanation for physical SG7 56/77 or 1/4 traffic; 77/77 and 4/4 require an approved field retest and per-RCB actual ingress/readback proof.
  • No polling fallback, blind GI/Resv retries, manufacturer workaround, DataSet rewrite, hidden continuity claims, changes to command/write.
  • Engine tests and source gates required before considering review-ready. Keep PR draft until CI completes.
  • P8 ARSAS #763 remains open draft; ARSAS #707 stays open until SG7 acceptance.
  • See docs/P9_MULTI_RCB_RECEIVE_CORRECTNESS.md for bounded contract, source-race evidence and provenance.

Copy link
Copy Markdown
Owner Author

P9 exact-SHA validation — ready for review of code, not for production promotion

Final PR head: 53d66603b296f56deeb48d3cf79d9035bf916fa1, based on staging ae1ce23dbc181c2a17aef20802f7517892fe4264.

.NET CI #41217691494 SUCCESS at this exact source (not the earlier pre-cleanup commit). Source/provenance verification PASS; Release solution build PASS; 1,285/1,285 tests PASS (baseline 1,282 + 3 synthetic four-RCB tests); packaging and uploads SUCCESS.

CI artifacts: test build 13048099938, diagnostics 13048783579. These are engine test artifacts, not an ARSAS Windows executable.

Limitations: Missing physical SG7 Report ingress may still have other causes. The new registration closes the post-write readback/GI race but does not project unacknowledged pre-write-acknowledgment reports. No field proof of 77/77, 4/4 or lossless buffered replay. Preserve PR Draft, leave ARSAS #707 open and the existing P8 Windows trial unchanged pending field evidence and consumer integration review.

…change

Remove receive-hot-path registry lock and per-frame Where/ToArray allocation; atomically clear stale session targets on disconnect. Add association reset regressions and repeatable four-RCB BER allocation/throughput telemetry without CI-host-dependent speed gate.

masarray commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

P9 optimization milestone — exact-SHA CI passed (2026-11-05)

Engine head: e49968409452334d2402f6ac8dca9fe92abe5a6e; base remains staging ae1ce23dbc181c2a17aef20802f7517892fe4264. Exact-head .NET CI #41972787534 SUCCESS: 1,288/1,288 tests PASS, solution build, source verification and artifacts passed. Preexisting P9 head 53d66603 had 1,285/1,285 PASS; this extends by three targeted fixtures.

Evidence-supported performance defect resolved

Previously RoutePersistentInformationReport called SnapshotPersistentReportMonitors() for every MMS InformationReport, which locked _persistentReportMonitorSync, performed Where(!IsStopped), and allocated a fresh array even when the same four RCBs remained active. Fixed via immutable per-association RCB arrays published with Volatile.Write only on register/unregister/reset and read with Volatile.Read on dispatch; no receive-path registry mutex or per-frame snapshot array. Identity conflict/ambiguous routing logic is deliberately unchanged. Reset now publishes an empty active snapshot and marks old targets stopped under the membership lock, then drains pending frames without holding the lock.

Realistic deterministic tests/measurements

Added registry-stability, duplicate-registration, reset/old-session invalidation test; a 16,384-read no-per-frame-allocation registry probe; and a warmed four-RCB BER decode→routing→delivery workload capturing elapsed time/allocated bytes per frame through ITestOutputHelper. The benchmark is observational, not an arbitrary CI-host throughput SLA. Test diagnostics artifact #13389958971. Dedicated build artifact #13389684812.

Integration constraints

Keep PR Draft pending review and physical validation. This is a validated CPU/allocation hot-path design improvement, not yet a measured end-user speedup or proof of SG7 77/77 and 4/4 recovery. No hidden cyclic MMS polling, RCB ownership workaround, giant debug logging, or changes to ARSAS P8 #763, ARSAS PR #766, canonical engine lock, main or stable release. A Windows P9 trial must be uniquely named and exact-SHA pinned; do not confuse the canonical Windows Build artifact (engine f75e323e) with a P9 integrated binary.

…B delivery at reset

Make exact RptID routing single-pass, defer affinity/DatSet scans, preserve fail-closed identity precedence. Add nonblocking producer admission lease so stopped RCBs drain without late delivery; protect volatile stopped state. Add allocation and concurrency regressions.

masarray commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

P9 exact-SHA software milestone — CI verified, NOT physical acceptance (2026-11-05).

  • Engine P9: 58d22be43d93d1d439df04a99ba935a7ec45cd4c, ARIEC #200, .NET CI #41980603839 1,292/1,292 PASS. Full four-RCB identity routing, no per-frame candidate arrays in exact RptID path, bounded delivery, close/reset admission barrier and association registry tests.
  • ARSAS Windows consumer: 063cf6e26c401e0586dc440adb5e646d8e74b0cd, nonpromotion PR #767 stacked on already verified P8 consumer PR #766.
  • P9 integrated Windows run #41981252170: SUCCESS; exact source/engine SHA gate PASS; 951/951 focused ARSAS reporting regression PASS; native ArdIrec bridge/CTest PASS; portable single-file EXE build PASS; portable EXE smoke PASS; artifact upload PASS.
  • Download Windows x64 P9 trial: ARSAS-REPORTING-P9-TRIAL-58d22be4-win-x64.exe (artifact ID 13394580582; GitHub login/access may be needed).
  • Exact EXE SHA-256: 23b5742166605b16c1e015d0f584e1eaf936dbb2a5dac62d2d988b22c4ea2f76.
  • Baseline engine pin preserved: f75e323e9f8443aa20e0a3818a1d5d77255b2c0f. Main/RC/stable release, P8 PR #763 and P9 staging were NOT repinned/merged.

What this DOES NOT establish: SG7 physical recovery to 77/77 and 4/4; original SIEBCU first-attempt TCP/ACSE failure cause; lossless SOE continuity or physical endurance. CI is a synthetic/integration build gate, not IEC 61850 interoperability FAT. Keep PRs Draft and issue #707 OPEN pending actual field evidence. No cyclic MMS polling or spontaneous control/RCB ownership changes were introduced.

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