Skip to content

P0: opt-in negotiated MMS NameList wire pipeline with exact response routing - #197

Merged
masarray merged 5 commits into
mainfrom
feat/mms-negotiated-name-list-pipeline-20261016
Oct 16, 2026
Merged

masarray merged 5 commits into
mainfrom
feat/mms-negotiated-name-list-pipeline-20261016

Conversation

@masarray

Copy link
Copy Markdown
Owner

P0 milestone: bounded, negotiated wire-level GetNameList pipelining (opt-in)

Baseline main bcbebc32ad19836cfd79ab05c1dec73e295b8721. Builds on merged #185 (measured wire budget) and #187 (orphan invoke-ID fail-closed). No existing concurrent dispatcher, no additional receive threads, no duplicate MMS client, no rewrite.

Root cause and implementation

Serial exchange_confirmed waits for every response before the next independent per-domain NameList request. Actual MMS Initiate-Response can strictly negotiate maxOutstandingCalling > 1; today this remains unused. Naively multithreading calls would race socket receive and COTP reassembly.

  • New exchange_confirmed_batch is a single association-owned synchronous dispatcher: validate every confirmed P-DATA + unique invoke ID and verified negotiated calling window before sending, serialize complete MMS/COTP sends, receive from the one authoritative socket, route interleaved InformationReports, accept out-of-order confirmation by exact registered invoke-ID, reject unregistered/duplicate/stale responses, and return deterministic input-order results.
  • Strictly decoded, positive peer window required. Tolerant ACSE decode cannot claim concurrency; effective cap min(peer maxOutstandingCalling, 8, operator request). No external std::async, concurrent sockets, arbitrary sleep or cyclic Read.
  • MmsLiveDiscoveryClient introduces optional bounded domain/class GetNameList chains; each chain's continuation pages remain sequential and preserve exact case-sensitive identifiers, name order, bounds and failure evidence. Unattempted/unverified pages are never fabricated. Serial is unchanged by default; unknown peer capabilities safely fall back to serial.
  • Field-lab CLI opt-in: ariec61850_live_discover <host> --name-list-window 4 (valid 1..8, default 1). Workbench and other existing consumers retain serial mode by default.
  • Zero-traffic KPI: actual fully transmitted GetNameList request count plus highest issued-but-not-yet-read name-list window in discovery summary. Number of MMS service requests should remain equal for equivalent models; latency reduction is not claimed until same-IED repeat runs with packet evidence.

Negative and parity regression

  • 2-LD fixture: serial vs four independent outstanding chains, responses delivered in inverse invoke order, with pagination. Exact full variable/DataSet inventories and wire-request count parity.
  • Interleaved InformationReport, mismatched/duplicate invoke-ID and oversized batch must not map false results; no unsent request passes as successful.
  • Caller send receipts persist after timeout/fault; batch aborts/connection closes and can reconnect. Truncated/no-forward-progress continuation fails closed without fabricating missing variables. Faulted association retains only VMD-proven domains.
  • Existing MMS SCL, Reporting/RCB, Qt Workbench and Studio unchanged at their respective ownership boundaries.

Acceptance gates

Require exact-head completed C++ CI (GCC/Clang/MSVC), native Workbench, SCL-assisted, protocol/security and Product Naming Guard, plus review-thread clearance. Do not merge pending/skipped checks. Physical IED acceptance, Windows installed Workbench acceptance, and measurable speedup remain separate gates.

Known unrelated current main IED Simulator Release Hardening failure: Windows NSIS Chocolatey feed HTTP 503 on dependency retrieval, before build, not evidence of protocol regression; distinguish infra from actual build/test failures.

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

ℹ️ 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 src/mms/live_discovery.cpp Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T11:10:04.887781Z b491387 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@masarray
masarray merged commit 47f9966 into main Oct 16, 2026
27 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