Skip to content

P0 SBO Enhanced: per-invoke TPKT send / confirmed response / decode timing (no safety change) - #187

Closed
masarray wants to merge 4 commits into
trial/p0-c-stage-gated-latency-evidence-20261021from
fix/p0-sbo-enhanced-confirmed-wire-stage-timing-20261021
Closed

masarray wants to merge 4 commits into
trial/p0-c-stage-gated-latency-evidence-20261021from
fix/p0-sbo-enhanced-confirmed-wire-stage-timing-20261021

Conversation

@masarray

Copy link
Copy Markdown
Owner

Why

FAT SIEBCU #662 measured 5 enhanced SBOw→Operate+positive termination commands: ~0.77–6.75s total, SBOw service ~27–2902ms, Operate service ~304–4523ms, fixed 400–411ms LastApplError observation window and ~9–11ms feedback. Existing serviceMs combines local send gate, TPKT stream writing, IED response/transport latency, and decoder. Neither global community averages nor UI animations identify which component dominates. This PR adds bounded, per-invoke evidence without claiming a speedup.

Exact stack

Engineering

  • For only MMS Write (select-with-value/operate/cancel and other explicit writes), optionally record local elapsed TPKT send including send-gate/stream write, await-confirmed-response including router/PDU delivery, then MMS decoder time, attached to that specific result not one mutable global timestamp.
  • Add fields to MmsWriteResult with nullable evidence; a failed or unknown response does not fabricate timing.
  • Append tpktSendMs, confirmedResponseWaitMs, mmsDecodeMs to existing operator-visible ordered Iec61850ControlWireStep.Detail, together with existing serviceMs and postResponseWaitMs. Scope remains client process time, not pure wire RTT.
  • Does not modify SBOw→Operate order, 400ms LastApplError window, termination, control request bytes, ctlNum/T/Origin/Test/Check, native write semantics, timeout, report coverage or frame routing.
  • Source/offline tests cover zero-knowledge absent evidence, per-invoke hook, preserved guards and TCP NoDelay.

Acceptance

Run exact-HEAD engine Windows CI. Consumer pin only after independent full ARSAS CI and repeat physical approved simulator/IED captures with Wireshark Tx, Rx, invokeID and stage metrics. If send gate is sub-ms and confirmed wait is 1–4s, target peer/network investigation rather than deleting safety logic; if local TPKT send is delayed, inspect concurrent frame send traffic. Do not assert performance improvements from instrumentation alone.

masarray added a commit that referenced this pull request Oct 22, 2026
… dropping baseline

Merge source HEADs: #189 24aae46, #186 d095b3a, #187 4ed76cc, #182 ded5036.

Eleven path updates: ten literal source/test file blobs verified unchanged against individual merge-bases, plus deliberate CI workflow integration instead of #182's historical limited-branch trigger. Synthetic-merge checkout and all stacked branch PR triggers. This is a draft integration candidate, NOT field-qualified, NOT ARSAS repin or release. No main modification.

Copy link
Copy Markdown
Owner Author

Repository consolidation audit, 2026-10-22: exact source HEAD 4ed76ccd11b763dcd847395f6ef45273db3f5c9c was verified as a Git ancestor (0 missing commits) of canonical combined draft PR #190 HEAD 14b19d30466fd296ad1e6d0bddcdd574992bc464. PR #190 validated this exact integration via Windows merge-tree CI #39778971482: 1,262/1,262 tests pass, zero build errors or warnings.

Closing this original PR as CONSOLIDATED / SUPERSEDED BY #190, WITHOUT merging it directly to main. All branch refs, original commits, engineering discussion and FAT evidence remain preserved and recoverable. #190 remains DRAFT, not field/physical accepted, engine source not yet merged to main, ARSAS pin unchanged. Reopen if consolidation is withdrawn or its functionality becomes independently active.

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