docs: fill missing XML docs and strip tracking IDs from src comments

Clears CommentChecker findings in src/ (3,280 -> 209, the remainder being false
positives like PLC-5/IEEE-754/M0.0) by adding missing summaries/params/returns,
normalising inheritdoc usage, and removing Gitea/review tracking IDs while keeping
the rationale they annotated. Comment-only: comment-stripped sources are identical
to the parent commit.
This commit is contained in:
Joseph Doherty
2026-10-15 06:14:58 -04:00
parent ebcbd81fca
commit 826312befe
430 changed files with 4434 additions and 3923 deletions
@@ -9,7 +9,7 @@ namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
/// Side-effecting orchestrator over <see cref="AddressSpacePlan"/>. Drives an
/// <see cref="IOpcUaAddressSpaceSink"/> to materialise the diff between two
/// <see cref="AddressSpaceComposition"/> snapshots, routing each delta class to its MINIMAL mutation
/// (R2-07 03/P1) via <see cref="AddressSpaceChangeClassifier"/> instead of rebuilding the whole
/// via <see cref="AddressSpaceChangeClassifier"/> instead of rebuilding the whole
/// address space for any topology change (which would kill every client's server-wide subscriptions):
///
/// <list type="bullet">
@@ -127,7 +127,7 @@ public sealed class AddressSpaceApplier
plan.AddedEquipmentVirtualTags.Count +
plan.AddedRawContainers.Count + plan.AddedRawTags.Count + plan.AddedUnsReferenceVariables.Count;
// R2-07 03/P1 — classify the plan and route each delta class to its MINIMAL mutation instead of
// Classify the plan and route each delta class to its MINIMAL mutation instead of
// rebuilding the world for any topology change. AddressSpaceChangeClassifier is a pure policy over
// the planner's diff (the planner stays a pure diff). The routing here:
// • PureAdd / AttributeOnly ⇒ NO rebuild. The idempotent Materialise passes in
@@ -162,7 +162,7 @@ public sealed class AddressSpaceApplier
// MaterialiseHierarchy re-creates every folder with the new display names, so the renames are
// covered for free and need no separate surgical pass.
var renamedFolders = plan.RenamedFolders;
// v3 surgical raw-tag + UNS-reference deltas (2026-08-15 surgical-deploys, Task 5). When kind is not
// v3 surgical raw-tag + UNS-reference deltas (2026-08-15 surgical-deploys). When kind is not
// Rebuild the classifier has ALREADY guaranteed every ChangedRawTags entry is surgical-eligible; the
// filter is defense-in-depth so a future classifier change can only ever under-apply here (the
// non-eligible remainder is left to the rebuild the classifier would have demanded).
@@ -230,7 +230,7 @@ public sealed class AddressSpaceApplier
// Compute writable + historian EXACTLY as MaterialiseRawSubtree does so the in-place update
// matches what a rebuild would have produced: an array is writable only when its driver can
// write arrays (#610) and a blank historian override falls back to the RawPath (== NodeId).
// write arrays and a blank historian override falls back to the RawPath (== NodeId).
var writable = RawNodeWritable(d.Current);
var historian = d.Current.IsHistorized
? (string.IsNullOrWhiteSpace(d.Current.HistorianTagname) ? d.Current.NodeId : d.Current.HistorianTagname)
@@ -275,7 +275,7 @@ public sealed class AddressSpaceApplier
if (IsIdentityPreservingUnsRefDelta(d))
{
// Resolve writable + historian EXACTLY as MaterialiseUnsReferences does when it creates
// the node: an array is writable only when its backing driver can write arrays (#610), and
// the node: an array is writable only when its backing driver can write arrays, and
// a blank override falls back to the backing RawPath (which IS the backing raw tag's NodeId).
var writable = UnsReferenceNodeWritable(d.Current);
var historian = d.Current.BackingIsHistorized
@@ -300,7 +300,7 @@ public sealed class AddressSpaceApplier
if (!SafeWriteValue(d.Previous.NodeId, null, OpcUaStatus.Bad, ts, AddressSpaceRealm.Uns)) failedNodes++;
if (!SafeRemoveVariable(surgical, d.Previous.NodeId, AddressSpaceRealm.Uns)) { allApplied = false; break; }
}
// R2-07 Phase 2/3 — scoped remove teardown for PureRemove AND AddRemoveMix (runs after any
// Scoped remove teardown for PureRemove AND AddRemoveMix (runs after any
// coincident surgical attribute updates / renames succeeded). Terminal Bad /
// RemovedConditionState writes then in-place removes; any false/throw flips allApplied → the
// rebuild ratchet below. For AddRemoveMix the adds are materialised afterward by the publish
@@ -339,12 +339,12 @@ public sealed class AddressSpaceApplier
}
/// <summary>
/// R2-07 Phase 2 — apply a PureRemove plan by tearing down ONLY the affected nodes IN PLACE (no full
/// Apply a PureRemove plan by tearing down ONLY the affected nodes IN PLACE (no full
/// rebuild). Removed equipment "own" their child tags/vtags/alarms, so any removed child whose
/// <c>EquipmentId</c> is itself in <see cref="AddressSpacePlan.RemovedEquipment"/> is SUBSUMED by the
/// subtree removal and skipped individually. For surviving-equipment removals: a removed value
/// variable gets a terminal Bad <c>WriteValue</c> then <see cref="ISurgicalAddressSpaceSink.RemoveVariableNode"/>;
/// a removed alarm-bearing tag (the pre-R2-07 today-gap: it got no terminal condition write) and a
/// a removed alarm-bearing tag (previously it got no terminal condition write) and a
/// removed scripted alarm get a terminal <see cref="RemovedConditionState"/> write then
/// <see cref="ISurgicalAddressSpaceSink.RemoveAlarmConditionNode"/>; each removed equipment gets one
/// <see cref="ISurgicalAddressSpaceSink.RemoveEquipmentSubtree"/>. The terminal write is what an
@@ -408,7 +408,7 @@ public sealed class AddressSpaceApplier
// unchanged) or to its own remove-the-previous + recreate-the-current pair (identity changed). That
// second shape does remove a node, but it removes it from Apply's delta loop, not from here.
//
// Gitea #599 (archreview 03/P5): this runs BEFORE the equipment-subtree removal below, deliberately,
// This runs BEFORE the equipment-subtree removal below, deliberately,
// instead of skipping a removed equipment's references with the NotSubsumed filter the loops above
// use. Whether the subtree removal reaches a reference depends on its NodeId, not on its parent: the
// node manager scopes a subtree by id prefix, and a reference's NodeId is Area/Line/Equipment/Name
@@ -457,7 +457,26 @@ public sealed class AddressSpaceApplier
}
/// <summary>
/// 2026-08-15 review I2 — true when a <see cref="AddressSpacePlan.UnsReferenceDelta"/> can be applied
/// The ONE writability rule for a raw value node, shared by the materialise pass and the
/// surgical in-place update so the two can never disagree: authored <c>ReadWrite</c>, and — for an array —
/// a driver that can write the array (<see cref="RawTagPlan.ArrayWritable"/>, from
/// <see cref="ZB.MOM.WW.OtOpcUa.Core.Abstractions.DriverArrayWriteSupport"/>). An array tag on a driver
/// with no array encoder stays read-only, so a client write is refused at the node (<c>BadNotWritable</c>)
/// instead of being optimistically applied and reverted.
/// </summary>
/// <param name="t">The raw tag plan.</param>
/// <returns><c>true</c> when the materialised raw node is writable.</returns>
internal static bool RawNodeWritable(RawTagPlan t) => t.Writable && (!t.IsArray || t.ArrayWritable);
/// <summary>The UNS-mirror counterpart of <see cref="RawNodeWritable"/>, off the inherited <c>Backing*</c>
/// fields — a mirror is writable exactly when its raw node is.</summary>
/// <param name="v">The UNS reference variable.</param>
/// <returns><c>true</c> when the mirror node is writable.</returns>
internal static bool UnsReferenceNodeWritable(UnsReferenceVariable v) =>
v.Writable && (!v.BackingIsArray || v.BackingArrayWritable);
/// <summary>
/// True when a <see cref="AddressSpacePlan.UnsReferenceDelta"/> can be applied
/// as an IN-PLACE attribute update rather than a remove+recreate: the node's identity is untouched.
/// Three fields make up that identity — the <c>NodeId</c> (an OPC UA NodeId is immutable, so a moved
/// effective name is a different node), the <c>EquipmentId</c> (the node's PARENT, which
@@ -467,26 +486,11 @@ public sealed class AddressSpaceApplier
/// </summary>
/// <param name="d">The UNS reference delta to classify.</param>
/// <returns><c>true</c> when the delta is attribute-only and may be applied in place.</returns>
/// <summary>
/// Gitea #610 — the ONE writability rule for a raw value node, shared by the materialise pass and the
/// surgical in-place update so the two can never disagree: authored <c>ReadWrite</c>, and — for an array —
/// a driver that can write the array (<see cref="RawTagPlan.ArrayWritable"/>, from
/// <see cref="ZB.MOM.WW.OtOpcUa.Core.Abstractions.DriverArrayWriteSupport"/>). An array tag on a driver
/// with no array encoder stays read-only, so a client write is refused at the node (<c>BadNotWritable</c>)
/// instead of being optimistically applied and reverted.
/// </summary>
internal static bool RawNodeWritable(RawTagPlan t) => t.Writable && (!t.IsArray || t.ArrayWritable);
/// <summary>The UNS-mirror counterpart of <see cref="RawNodeWritable"/>, off the inherited <c>Backing*</c>
/// fields — a mirror is writable exactly when its raw node is.</summary>
internal static bool UnsReferenceNodeWritable(UnsReferenceVariable v) =>
v.Writable && (!v.BackingIsArray || v.BackingArrayWritable);
private static bool IsIdentityPreservingUnsRefDelta(AddressSpacePlan.UnsReferenceDelta d) =>
string.Equals(d.Previous.NodeId, d.Current.NodeId, StringComparison.Ordinal) &&
string.Equals(d.Previous.EquipmentId, d.Current.EquipmentId, StringComparison.Ordinal) &&
string.Equals(d.Previous.BackingRawPath, d.Current.BackingRawPath, StringComparison.Ordinal) &&
// #610 review R6: the array-on-scalar refusal is fixed at node creation (UpdateTagAttributes does not
// The array-on-scalar refusal is fixed at node creation (UpdateTagAttributes does not
// carry it), so a change to it recreates the mirror rather than updating it in place.
d.Previous.BackingScalarRefusesArrayValue == d.Current.BackingScalarRefusesArrayValue;
@@ -518,7 +522,7 @@ public sealed class AddressSpaceApplier
/// on a removed variable so an in-flight MonitoredItem observes the removal.
/// <para>Every caller passes the generic <see cref="OpcUaStatus.Bad"/>, which is exactly what the
/// retired 3-state projection produced here. A removal could say something more specific (the node is
/// about to stop existing, so <c>BadNodeIdUnknown</c> would be truer), but #519 was about not LOSING a
/// about to stop existing, so <c>BadNodeIdUnknown</c> would be truer), but the point was not LOSING a
/// sub-code the driver already had — inventing a new one for the deploy path is a separate call, so
/// this deliberately stays behaviour-identical.</para></summary>
/// <returns><c>true</c> when the write landed; <c>false</c> when the sink threw.</returns>
@@ -563,7 +567,7 @@ public sealed class AddressSpaceApplier
}
/// <summary>
/// Gitea #599 (archreview 01/U-8 = 03/P6) — the Raw-realm counterpart of
/// The Raw-realm counterpart of
/// <see cref="ComputeAddAnnouncements"/>: the deduplicated, ordinal-sorted RAW parent node ids to announce
/// after a non-rebuild apply materialised added raw containers (Folder/Driver/Device/TagGroup) and raw
/// tags. Each added node announces its <c>ParentNodeId</c> — the exact parent
@@ -631,7 +635,7 @@ public sealed class AddressSpaceApplier
/// Uses the existing, guard-covered, realm-aware
/// <see cref="IOpcUaAddressSpaceSink.RaiseNodesAddedModelChange"/> — no new sink member. Each call is
/// Safe-wrapped: a faulting announcement can never break a deploy (the nodes already stand).
/// <para>Gitea #599: until the raw half existed, surgically-added raw containers/tags were materialised
/// <para>until the raw half existed, surgically-added raw containers/tags were materialised
/// but never announced, so a connected model-aware client could not discover them until it happened to
/// re-browse. (Before surgical deploys every raw add rebuilt the address space, which hid the gap.)</para>
/// </summary>
@@ -678,7 +682,7 @@ public sealed class AddressSpaceApplier
AddRequest(tag);
}
// #600.1: a historization flip (false->true) or a historian-name / data-type change on an
// A historization flip (false->true) or a historian-name / data-type change on an
// EXISTING raw tag never appears in AddedRawTags, so EnsureTags never fired for it. EnsureTags is
// an upsert, so re-ensuring is safe; an unchanged pair is a no-op. Only raw deltas are used - a
// UNS mirror delta must not double-provision the same historian tag.
@@ -902,7 +906,7 @@ public sealed class AddressSpaceApplier
/// nodes (Folder→Driver→Device→TagGroup, each an <c>Object</c>/<c>Folder</c>) parents-before-children,
/// then the tag Variable nodes keyed <c>s=&lt;RawPath&gt;</c>. A native-alarm tag (<see cref="RawTagPlan.Alarm"/>
/// non-null) materialises as a Part 9 condition node at its RawPath (ConditionId = RawPath, parent = its
/// device/group folder) instead of a value variable — the single condition instance; WP4 wires the extra
/// device/group folder) instead of a value variable — the single condition instance; the extra
/// per-equipment notifiers. A historized value tag resolves its effective historian tagname HERE
/// (override else the RawPath). Array tags are forced read-only (the driver write path can't handle
/// arrays). Every sink call passes <see cref="AddressSpaceRealm.Raw"/> EXPLICITLY — the driver binds
@@ -938,7 +942,7 @@ public sealed class AddressSpaceApplier
if (!SafeEnsureFolder(c.NodeId, c.ParentNodeId, c.DisplayName, AddressSpaceRealm.Raw)) failed++;
}
// v3 Batch 4 WP4 — reverse map (equipment UNS folder PATH → EquipmentId) so a native alarm's
// Reverse map (equipment UNS folder PATH → EquipmentId) so a native alarm's
// ReferencingEquipmentPaths (Area/Line/Equipment name paths, from the composer) resolve to the
// EquipmentId the equipment folders were materialised under by MaterialiseHierarchy. Built lazily only
// when at least one raw tag carries an alarm (the common no-alarm deploy pays nothing).
@@ -956,7 +960,7 @@ public sealed class AddressSpaceApplier
}
else if (t.ReferencingEquipmentPaths.Count > 0)
{
// WP4 multi-notifier fan-out: wire the SINGLE condition as an event notifier of each
// Multi-notifier fan-out: wire the SINGLE condition as an event notifier of each
// referencing equipment's UNS folder, so one ReportEvent reaches every referencing equipment
// (never re-reported per root). Resolve the folder PATHS to their EquipmentId folder NodeIds
// (the id scheme MaterialiseHierarchy created the equipment folders under).
@@ -969,7 +973,7 @@ public sealed class AddressSpaceApplier
.ToList();
if (equipFolderNodeIds.Count == 0)
{
// Wave C review M2: the alarm HAS referencing equipment but NONE of its paths resolved
// Wave C review the alarm HAS referencing equipment but NONE of its paths resolved
// to an EquipmentId folder — the native fan-out to those equipment is silently absent.
// Surface it (Warning + a failed-node tally so the degraded-apply meter fires) instead
// of swallowing zero operator signal. Today this only happens on a broken UNS ancestry /
@@ -991,7 +995,7 @@ public sealed class AddressSpaceApplier
{
// A historized tag materialises Historizing + HistoryRead; the effective historian tagname is
// the override else the RawPath (== NodeId). An array is writable only when its driver can
// write arrays (#610) — see RawNodeWritable.
// write arrays — see RawNodeWritable.
string? historianTagname = t.IsHistorized
? (string.IsNullOrWhiteSpace(t.HistorianTagname) ? t.NodeId : t.HistorianTagname)
: null;
@@ -1014,7 +1018,7 @@ public sealed class AddressSpaceApplier
/// UNS→Raw to its backing raw node. The UNS node inherits DataType / writable / array shape / historian
/// tagname from its backing RAW tag, so a historized raw tag's UNS reference registers the SAME tagname
/// (both NodeIds → one tagname → HistoryRead works against either). The UNS node binds NO driver — the
/// driver publish path fans values to it (WP3 runtime binding). Every sink call passes
/// driver publish path fans values to it (runtime binding). Every sink call passes
/// <see cref="AddressSpaceRealm.Uns"/> / the Organizes edge passes both realms EXPLICITLY. Idempotent.
/// <para><b>The inherited values are read from the <see cref="UnsReferenceVariable"/> RECORD, not
/// re-looked-up from <see cref="AddressSpaceComposition.RawTags"/> by RawPath.</b> The record is the
@@ -1140,7 +1144,7 @@ public sealed class AddressSpaceApplier
? (string.IsNullOrWhiteSpace(tag.HistorianTagname) ? tag.FullName : tag.HistorianTagname)
: null;
// Retired equipment-tag path (structurally empty in v3): array tags stay forced read-only
// here. The live array-write capability (#610) is carried on RawTagPlan /
// here. The live array-write capability is carried on RawTagPlan /
// UnsReferenceVariable only — see RawNodeWritable.
var writable = tag.Writable && !tag.IsArray;
if (!SafeEnsureVariable(nodeId, parent, tag.Name, tag.DataType, writable, AddressSpaceRealm.Uns, historianTagname, tag.IsArray, tag.ArrayLength)) failed++;
@@ -1285,7 +1289,7 @@ public sealed class AddressSpaceApplier
catch (Exception ex) { _logger.LogWarning(ex, "AddressSpaceApplier: EnsureVariable threw for {Node}", nodeId); return false; }
}
// The tag/vtag surgical-eligibility predicates moved to AddressSpaceChangeClassifier (R2-07 T1) so the
// The tag/vtag surgical-eligibility predicates moved to AddressSpaceChangeClassifier so the
// whole delta classification is one pure, table-testable unit; the applier references them there (and the
// classifier's Classify names the routing). The `with`-expression whitelist technique is preserved there
// byte-for-byte.
@@ -1322,7 +1326,7 @@ public sealed class AddressSpaceApplier
catch (Exception ex) { _logger.LogWarning(ex, "AddressSpaceApplier: MaterialiseAlarmCondition threw for {Node}", alarmNodeId); return false; }
}
/// <summary>Wire a native alarm condition's extra equipment-folder notifiers (WP4 multi-notifier),
/// <summary>Wire a native alarm condition's extra equipment-folder notifiers (multi-notifier),
/// swallowing (and Warning-logging) any sink fault. Returns <c>true</c> on success, <c>false</c> when the
/// sink threw — callers tally the false into their pass's failed-node count (archreview 01/S-1).</summary>
/// <returns><c>true</c> when the notifiers were wired; <c>false</c> when the sink threw.</returns>
@@ -1333,7 +1337,7 @@ public sealed class AddressSpaceApplier
}
/// <summary>
/// v3 Batch 4 WP4 — build the reverse map <c>equipment UNS folder PATH (Area/Line/Equipment) →
/// Build the reverse map <c>equipment UNS folder PATH (Area/Line/Equipment) →
/// EquipmentId</c>. The composer emits a native alarm's <see cref="RawTagPlan.ReferencingEquipmentPaths"/>
/// as name paths (<c>V3NodeIds.Uns(areaName, lineName, equipName)</c>), but the equipment folders were
/// materialised under their logical <c>EquipmentId</c> by <see cref="MaterialiseHierarchy"/>, so the
@@ -2,7 +2,7 @@ namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
/// <summary>How <see cref="AddressSpaceApplier"/> must mutate the address space for a given
/// <see cref="AddressSpacePlan"/>. A pure policy classification OVER the planner's diff (the planner stays
/// a pure diff; the kind is the applier's routing policy over that diff — see R2-07 03/P1).</summary>
/// a pure diff; the kind is the applier's routing policy over that diff).</summary>
public enum AddressSpaceChangeKind
{
/// <summary><see cref="AddressSpacePlan.IsEmpty"/> — nothing to do.</summary>
@@ -58,7 +58,7 @@ public static class AddressSpaceChangeClassifier
// RawTagDeltaIsSurgicalEligible, and a changed vtag UNLESS it is node-irrelevant. Evaluated BEFORE the
// add/remove split so a non-surgical change alongside pure adds still rebuilds.
//
// WP4 BINDING GUARD (Wave C review M3), as narrowed by the 2026-08-15 surgical-deploys work. The
// BINDING GUARD, as narrowed by the 2026-08-15 surgical-deploys work. The
// guard's subject is NATIVE-ALARM NOTIFIER WIRING: a native alarm's set of referencing equipment lives
// in RawTagPlan.ReferencingEquipmentPaths (part of its record equality), and only a rebuild clears +
// re-wires those notifiers, so an ALARM-BEARING raw tag (Alarm != null on EITHER side) still routes to
@@ -130,6 +130,9 @@ public static class AddressSpaceChangeClassifier
// so a delta changing ONLY those three leaves a byte-identical node and needs no address-space rebuild.
// Whitelist-of-may-differ via `with` + the record's custom Equals: any OTHER field difference (current
// or future) makes the override unequal → falls back to a full rebuild (safe default).
/// <summary>Whether a changed equipment virtual tag differs only in fields that do not affect its materialised node.</summary>
/// <param name="d">The virtual-tag delta to classify.</param>
/// <returns><see langword="true"/> when only Expression / DependencyRefs / Historize differ; otherwise <see langword="false"/>.</returns>
internal static bool VtagDeltaIsNodeIrrelevant(AddressSpacePlan.EquipmentVirtualTagDelta d) =>
(d.Previous with
{
@@ -153,6 +156,9 @@ public static class AddressSpaceChangeClassifier
// TagConfigIntent.Parse falls back to the RAW TagConfig blob as FullName, so a DataType/
// array edit also mutates that blob ⇒ FullName differs ⇒ this returns false ⇒ full rebuild. That is the
// correct safe default (a protocol driver's subscription needs re-spawning for a new shape anyway).
/// <summary>Whether a changed equipment tag can be updated in place on its existing node instead of rebuilding.</summary>
/// <param name="d">The equipment-tag delta to classify.</param>
/// <returns><see langword="true"/> when the tag has no alarm and differs only in the in-place-updatable attributes; otherwise <see langword="false"/>.</returns>
internal static bool TagDeltaIsSurgicalEligible(AddressSpacePlan.EquipmentTagDelta d) =>
d.Previous.Alarm is null && d.Current.Alarm is null &&
(d.Previous with
@@ -167,12 +173,15 @@ public static class AddressSpaceChangeClassifier
// v3 surgical raw-tag eligibility: a NON-alarm raw tag whose only differences are the in-place-updatable
// attributes (Writable / IsHistorized / HistorianTagname / DataType / IsArray / ArrayLength / ArrayWritable)
// and/or its ReferencingEquipmentPaths. ArrayWritable (Gitea #610) only feeds the node's writability — the
// and/or its ReferencingEquipmentPaths. ArrayWritable only feeds the node's writability — the
// same AccessLevel + OnWriteValue swap Writable already drives in place — so it must be listed here or
// every array-tag edit that flips it would fall through to a full rebuild. The referencing set is node-inert for a VALUE tag — it only drives native-alarm
// notifier wiring (the WP4 guard), which is why Alarm != null on EITHER side disqualifies. Identity fields
// notifier wiring (the binding guard), which is why Alarm != null on EITHER side disqualifies. Identity fields
// (NodeId is the diff key; TagId / DriverInstanceId / Name / ParentNodeId / Realm) still force a rebuild via
// the with-equality default-closed pattern.
/// <summary>Whether a changed raw tag can be updated in place on its existing node instead of rebuilding.</summary>
/// <param name="d">The raw-tag delta to classify.</param>
/// <returns><see langword="true"/> when the tag has no alarm and differs only in the in-place-updatable attributes or its referencing equipment paths; otherwise <see langword="false"/>.</returns>
internal static bool RawTagDeltaIsSurgicalEligible(AddressSpacePlan.RawTagDelta d) =>
d.Previous.Alarm is null && d.Current.Alarm is null &&
(d.Previous with
@@ -73,7 +73,7 @@ public sealed record AddressSpaceComposition(
/// <c>(realm=Raw, s=&lt;RawPath&gt;)</c>. The RawPath IS the node identity + the single value source
/// the driver binds; every referencing UNS variable fans out from it. Carries DataType / writable /
/// historize + array shape, the optional native-alarm intent (attached at the RAW tag —
/// ConditionId = RawPath), and the list of referencing equipment UNS folder paths (so WP4 wires the
/// ConditionId = RawPath), and the list of referencing equipment UNS folder paths (so the applier wires the
/// multi-notifier alarm). Init-only, defaults empty.
/// </summary>
public IReadOnlyList<RawTagPlan> RawTags { get; init; } = Array.Empty<RawTagPlan>();
@@ -134,16 +134,16 @@ public sealed record RawContainerNode(
/// <see cref="ArrayLength"/> are parsed from <c>Tag.TagConfig</c> via
/// <see cref="TagConfigIntent"/> (the single byte-parity authority). <see cref="ReferencingEquipmentPaths"/>
/// is the (possibly empty) set of UNS equipment-folder paths (<c>Area/Line/Equipment</c>) that reference
/// this tag — WP4 wires one notifier per path so the raw tag's single alarm condition fans to every
/// this tag — the applier wires one notifier per path so the raw tag's single alarm condition fans to every
/// referencing equipment. <see cref="Realm"/> is always <see cref="AddressSpaceRealm.Raw"/>.
/// A null <see cref="HistorianTagname"/> means the historian tagname defaults to the RawPath (resolved
/// later, not here).
/// <see cref="ArrayWritable"/> (Gitea #610) is whether the owning driver can write this tag as a whole
/// <see cref="ArrayWritable"/> is whether the owning driver can write this tag as a whole
/// 1-D array (<see cref="ZB.MOM.WW.OtOpcUa.Core.Abstractions.DriverArrayWriteSupport"/>); always
/// <see langword="false"/> for a scalar. The materialised node is writable iff
/// <c>Writable &amp;&amp; (!IsArray || ArrayWritable)</c>, so an array tag on a driver with no array
/// encoder stays read-only exactly as before #610.
/// <see cref="ScalarRefusesArrayValue"/> (#610 review R6) is true when the owning driver's SCALAR write path
/// encoder stays read-only exactly as before.
/// <see cref="ScalarRefusesArrayValue"/> is true when the owning driver's SCALAR write path
/// cannot take an array value
/// (<see cref="ZB.MOM.WW.OtOpcUa.Core.Abstractions.DriverArrayWriteSupport.RefusesArrayValueOnScalarTag"/>);
/// the node manager refuses an array write to the node inline while it is scalar-shaped. It is a fact about
@@ -243,9 +243,9 @@ public sealed record RawTagPlan(
/// existing machinery repairs it: the applier removes the previous UNS node and
/// <see cref="AddressSpaceApplier.MaterialiseUnsReferences"/> recreates it from these values.
/// <see cref="DataType"/> / <see cref="Writable"/> were already inherited onto the record and are
/// covered by the same mechanism, as is <see cref="BackingArrayWritable"/> (Gitea #610 — the backing
/// covered by the same mechanism, as is <see cref="BackingArrayWritable"/> (the backing
/// tag's <see cref="RawTagPlan.ArrayWritable"/>, so a mirror is writable exactly when its raw node
/// is), and <see cref="BackingScalarRefusesArrayValue"/> (#610 review R6 — the backing tag's
/// is), and <see cref="BackingScalarRefusesArrayValue"/> (the backing tag's
/// <see cref="RawTagPlan.ScalarRefusesArrayValue"/>, so a mirror refuses an array write exactly when its raw
/// node does; a change to it is treated as an identity change by the applier, so the mirror is recreated
/// rather than updated in place).</para>
@@ -676,7 +676,7 @@ public static class AddressSpaceComposer
Enabled: a.Enabled));
}
// Raw subtree (device-oriented) + UNS subtree (equipment-oriented) — the Batch-4 dual namespace.
// Raw subtree (device-oriented) + UNS subtree (equipment-oriented) — the dual namespace.
var (rawContainers, rawTags) = BuildRawSubtree(
rawFolders, driverInstances, devices, tagGroups, tags, unsTagReferences,
unsAreas, unsLines, equipment, topology);
@@ -826,7 +826,7 @@ public static class AddressSpaceComposer
}
/// <summary>
/// The per-driver array-write capability (Gitea #610) as a per-tag predicate over the owning driver's
/// The per-driver array-write capability as a per-tag predicate over the owning driver's
/// <c>DriverType</c>, the driver's <c>DriverConfig</c> and the tag's own device's <c>DeviceConfig</c>
/// (either config can carry a write cap such as Modbus <c>maxRegistersPerWrite</c>; the table takes the
/// smaller). First row wins on a duplicate id, matching the composer's other id maps. Built once per
@@ -845,7 +845,7 @@ public static class AddressSpaceComposer
}
/// <summary>
/// #610 review R6 MINOR-1 — whether a tag's owning driver refuses an array value on a SCALAR tag
/// Whether a tag's owning driver refuses an array value on a SCALAR tag
/// (<see cref="DriverArrayWriteSupport.RefusesArrayValueOnScalarTag"/>), as a per-tag predicate resolved
/// the same way as <see cref="BuildArrayWriteCapability"/>. Shared by the raw and UNS passes so a mirror
/// refuses exactly when its raw node does.
@@ -985,7 +985,7 @@ public static class AddressSpaceComposer
/// <summary>
/// <c>TagId → distinct, ordinal-sorted list of referencing equipment UNS folder paths</c>
/// (<c>Area/Line/Equipment</c>). Drives the native-alarm multi-notifier (WP4): the raw tag's single
/// (<c>Area/Line/Equipment</c>). Drives the native-alarm multi-notifier: the raw tag's single
/// alarm condition fans one event to each referencing equipment's UNS folder. A tag with no
/// resolvable reference is absent (⇒ an empty list at the call site).
/// </summary>
@@ -1021,6 +1021,7 @@ public static class AddressSpaceComposer
/// </summary>
private sealed class RawTopology
{
/// <summary>The RawPath authority over the folder/driver/device/group ancestry.</summary>
public required RawPathResolver Resolver { get; init; }
/// <summary><c>RawFolderId → RawPath</c> (absent when the ancestry is broken).</summary>
@@ -1038,6 +1039,12 @@ public static class AddressSpaceComposer
/// <summary><c>DeviceId → DriverInstanceId</c> — the raw tag's owning driver (for RawTagPlan).</summary>
public required IReadOnlyDictionary<string, string> DriverIdByDevice { get; init; }
/// <summary>Builds the topology from the raw-tree rows.</summary>
/// <param name="rawFolders">The raw folders, or null for none.</param>
/// <param name="driverInstances">The driver instances.</param>
/// <param name="devices">The devices, or null for none.</param>
/// <param name="tagGroups">The tag groups, or null for none.</param>
/// <returns>The resolved topology.</returns>
public static RawTopology Build(
IReadOnlyList<RawFolder>? rawFolders,
IReadOnlyList<DriverInstance> driverInstances,
@@ -6,7 +6,7 @@ using ZB.MOM.WW.OtOpcUa.Core.Abstractions;
namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
/// <summary>
/// Gitea #682 — make <c>HistoryServerCapabilities/AggregateFunctions</c> (i=11201) list exactly the aggregates the
/// Make <c>HistoryServerCapabilities/AggregateFunctions</c> (i=11201) list exactly the aggregates the
/// wired historian backend serves for HistoryRead (<see cref="IHistorianDataSource.SupportedAggregates"/>), instead of
/// the SDK's full registered set.
/// </summary>
@@ -7,7 +7,7 @@ namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
/// <summary>
/// The one table between OPC UA Part 13 standard aggregate-function NodeIds (<c>ObjectIds.AggregateFunction_*</c>)
/// and <see cref="HistoryAggregateType"/>. HistoryRead-Processed maps a request's aggregate through it, and the
/// advertised <c>AggregateFunctions</c> folders (#682) map a backend's served set back through it — one table, so a
/// advertised <c>AggregateFunctions</c> folders map a backend's served set back through it — one table, so a
/// NodeId the server can dispatch is exactly a NodeId it can advertise.
/// </summary>
internal static class AggregateFunctionMap
@@ -1,10 +1,10 @@
namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
/// <summary>
/// Gitea #694 item 2: the opt-in <c>ServerHistorian:EventReadHorizon</c> — HistoryReadEvents never reads events older than
/// The opt-in <c>ServerHistorian:EventReadHorizon</c> — HistoryReadEvents never reads events older than
/// <c>now − horizon</c>. Off (<see cref="TimeSpan.Zero"/>, the default) a read is exact down to whatever its window says,
/// which on the Gateway means a reverse / end-only read walked back with forward reads proves "nothing older" with one
/// read down to the Unix epoch (#691) — ~3.8 s live on <c>Runtime.dbo.Events</c>, and an unfiltered one can hit the
/// read down to the Unix epoch — ~3.8 s live on <c>Runtime.dbo.Events</c>, and an unfiltered one can hit the
/// gateway's 30 s SQL timeout. A forward read whose StartTime is far in the past costs the same on that table. The
/// horizon bounds both, at a stated price: events older than it are not returned, in either direction, on any backend.
/// </summary>
@@ -4,7 +4,7 @@ using ZB.MOM.WW.OtOpcUa.Core.Abstractions;
namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
/// <summary>
/// The end bound still owed to a HistoryRead-Raw read with <c>ReturnBounds = true</c> (Gitea #691). It rides the
/// The end bound still owed to a HistoryRead-Raw read with <c>ReturnBounds = true</c>. It rides the
/// continuation point, because Part 11 returns the end bound with the LAST page only.
/// </summary>
/// <param name="AtUtc">The request's end time (the later bound of a forward read, the earlier of a reverse one).</param>
@@ -18,7 +18,7 @@ namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
/// <param name="DataExhausted">The data is drained and the end bound did not fit on the previous page.</param>
/// <param name="LastReturnedUtc">The last value's time returned on an earlier page (stamps an open bound's placeholder).</param>
/// <param name="Resolved">
/// Gitea #692: the end bound an earlier page already looked up (a stored sample — never a placeholder), so the page that
/// the end bound an earlier page already looked up (a stored sample — never a placeholder), so the page that
/// returns it does not read the backend again. <c>null</c> = not looked up yet.
/// </param>
internal sealed record HistoryEndBound(
@@ -26,7 +26,7 @@ internal sealed record HistoryEndBound(
DataValueSnapshot? Resolved = null);
/// <summary>
/// Gitea #691: OPC UA Part 11 bounding values for HistoryRead-Raw (<c>ReadRawModifiedDetails.ReturnBounds</c>), composed
/// OPC UA Part 11 bounding values for HistoryRead-Raw (<c>ReadRawModifiedDetails.ReturnBounds</c>), composed
/// in the server from every backend's existing raw read — the ONE authority, so SqlServer, QuestDB, Gateway and Null
/// answer identically.
/// </summary>
@@ -49,7 +49,7 @@ internal sealed record HistoryEndBound(
/// declares <see cref="IHistorianDataSource.SupportsReverseRaw"/>, otherwise <see cref="ReverseRawReader"/>'s walk-back
/// from bounded forward reads (the Gateway: NOT AVEVA's synthetic boundary row, which is stamped at the query start
/// rather than at the prior sample's own time). "At or after T" is a forward read of <c>[T, MaxValue)</c> capped at one (on a
/// forward-only backend ending at now + <see cref="ReverseRawReader.LookAhead"/> instead — #691 review);
/// forward-only backend ending at now + <see cref="ReverseRawReader.LookAhead"/> instead);
/// "strictly after T" starts one storage resolution later (lossless: nothing is stored in between). Inside a tie
/// cluster the bound is the cluster's first sample in the read's direction — the forward read's first, the reverse
/// read's first (the forward order's last).
@@ -65,7 +65,7 @@ internal static class HistoryBounds
private static readonly TimeSpan OpenBoundStep = TimeSpan.FromSeconds(1);
/// <summary>
/// Gitea #692: the placeholders this server synthesised (<see cref="NotFound"/>), by reference. A placeholder is known by
/// the placeholders this server synthesised (<see cref="NotFound"/>), by reference. A placeholder is known by
/// this marker, never by its shape: a stored row can legitimately carry <c>Bad_BoundNotFound</c> with a null value (a
/// client may write one through HistoryUpdate), and that row is data.
/// </summary>
@@ -82,7 +82,7 @@ internal static class HistoryBounds
/// <summary>
/// Whether a returned value is a <see cref="NotFound"/> placeholder this server synthesised rather than a stored sample
/// — by an explicit marker (#692), so a stored row whose status happens to be <c>Bad_BoundNotFound</c> is not taken for one.
/// — by an explicit marker, so a stored row whose status happens to be <c>Bad_BoundNotFound</c> is not taken for one.
/// </summary>
/// <param name="value">The value.</param>
/// <returns><c>true</c> only for an instance <see cref="NotFound"/> produced.</returns>
@@ -111,6 +111,14 @@ internal static class HistoryBounds
/// The start bound to return ahead of the data, or <c>null</c> when a stored sample sits on StartTime (that sample is
/// the bound, and it is already the data's first sample).
/// </summary>
/// <param name="source">The backend.</param>
/// <param name="tagname">Historian tag.</param>
/// <param name="startUtc">The read's StartTime.</param>
/// <param name="reverse">Whether the read runs newest-first.</param>
/// <param name="maxTieCluster">The walk-back's row budget (forward-only backends).</param>
/// <param name="nowUtc">Now (the walk-back's look-ahead clamp).</param>
/// <param name="ct">Cancellation.</param>
/// <returns>The start bound, or null when a stored sample sits on StartTime.</returns>
public static async Task<DataValueSnapshot?> StartBoundAsync(
IHistorianDataSource source, string tagname, DateTime startUtc, bool reverse, int maxTieCluster, DateTime nowUtc,
CancellationToken ct)
@@ -131,6 +139,7 @@ internal static class HistoryBounds
/// <param name="maxTieCluster">The walk-back's row budget (forward-only backends).</param>
/// <param name="nowUtc">Now (the walk-back's look-ahead clamp).</param>
/// <param name="ct">Cancellation.</param>
/// <returns>The end bound sample, or a placeholder when none is stored.</returns>
public static async Task<DataValueSnapshot> EndBoundAsync(
IHistorianDataSource source, string tagname, HistoryEndBound bound, DateTime previousReturnedUtc,
int maxTieCluster, DateTime nowUtc, CancellationToken ct)
@@ -143,7 +152,7 @@ internal static class HistoryBounds
return NotFound(new DateTime(ticks, DateTimeKind.Utc));
}
if (bound.Resolved is { } resolved) return resolved; // #692: an earlier page already looked it up
if (bound.Resolved is { } resolved) return resolved; // an earlier page already looked it up
DataValueSnapshot? found;
if (bound.Reverse)
@@ -166,6 +175,10 @@ internal static class HistoryBounds
/// sample there is the end bound), compared at the storage resolution. A backend whose forward end is inclusive, or a
/// resumed read that steps onto the end time, would otherwise return the end bound twice.
/// </summary>
/// <param name="sample">The data sample to test.</param>
/// <param name="bound">The read's end bound.</param>
/// <param name="resolution">The backend's storage resolution in ticks.</param>
/// <returns><see langword="true"/> when the sample belongs to the data window.</returns>
public static bool InDataWindow(DataValueSnapshot sample, HistoryEndBound bound, long resolution)
{
if (!bound.Inclusive || bound.Open) return true;
@@ -175,6 +188,10 @@ internal static class HistoryBounds
}
/// <summary>Whether a resumed read's next start is already past the data window (only the end bound remains).</summary>
/// <param name="nextStartUtc">The resumed read's next start time.</param>
/// <param name="bound">The read's end bound.</param>
/// <param name="resolution">The backend's storage resolution in ticks.</param>
/// <returns><see langword="true"/> when only the end bound remains to be returned.</returns>
public static bool DataWindowDrained(DateTime nextStartUtc, HistoryEndBound bound, long resolution)
{
if (!bound.Inclusive || bound.Open) return false;
@@ -184,6 +201,13 @@ internal static class HistoryBounds
}
/// <summary>The latest stored sample at or before <paramref name="atUtc"/>, or null.</summary>
/// <param name="source">The backend.</param>
/// <param name="tagname">Historian tag.</param>
/// <param name="atUtc">The time to search back from.</param>
/// <param name="maxTieCluster">The walk-back's row budget (forward-only backends).</param>
/// <param name="nowUtc">Now (the walk-back's look-ahead clamp).</param>
/// <param name="ct">Cancellation.</param>
/// <returns>The latest stored sample at or before <paramref name="atUtc"/>, or null.</returns>
internal static async Task<DataValueSnapshot?> LatestAtOrBeforeAsync(
IHistorianDataSource source, string tagname, DateTime atUtc, int maxTieCluster, DateTime nowUtc, CancellationToken ct)
{
@@ -201,8 +225,14 @@ internal static class HistoryBounds
}
/// <summary>The earliest stored sample at or after <paramref name="atUtc"/>, or null.</summary>
/// <param name="source">The backend.</param>
/// <param name="tagname">Historian tag.</param>
/// <param name="atUtc">The time to search forward from.</param>
/// <param name="nowUtc">Now (the forward-only look-ahead clamp).</param>
/// <param name="ct">Cancellation.</param>
/// <returns>The earliest stored sample at or after <paramref name="atUtc"/>, or null.</returns>
/// <remarks>
/// #691 review: on a backend that reads forward only (the Gateway) the read's end is clamped to now +
/// On a backend that reads forward only (the Gateway) the read's end is clamped to now +
/// <see cref="ReverseRawReader.LookAhead"/> — the same horizon the walk-back uses — and a time beyond it is "not found"
/// without a read. The HistorianGateway only checks <c>start &lt;= end</c>, so a <c>DateTime.MaxValue</c> end would
/// reach AVEVA as a year-9999 query end (unverified: a rejection, or a fabricated row). The clamp is NOT applied to a
@@ -32,7 +32,7 @@ namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
/// </param>
/// <param name="NumValuesPerNode">The client's per-page cap; re-applied to every resumed page.</param>
/// <param name="Kind">
/// Which read issued the cursor (Gitea #669 / #668). A cursor is only ever resumed by the read kind that issued it, so a
/// Which read issued the cursor. A cursor is only ever resumed by the read kind that issued it, so a
/// raw point presented to an events or modified read (or any other mismatch) is a <c>BadContinuationPointInvalid</c>
/// miss. <see cref="HistoryCursorKind.Events"/>: <paramref name="Tagname"/> carries the registered historian
/// event-source name and the boundary fields are over <c>EventTimeUtc</c>.
@@ -47,27 +47,27 @@ namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
/// window and direction (the modified read resumes by key, not by moving the window start).
/// </param>
/// <param name="Reverse">
/// <see cref="HistoryCursorKind.Events"/> only (Gitea #675): the read is newest-first over
/// <see cref="HistoryCursorKind.Events"/> only: the read is newest-first over
/// <c>(EndUtc, NextStartUtc]</c>. A resumed events read takes its direction from here, never from the resume
/// request's details. Raw keeps deriving it from the window (<c>NextStartUtc &gt; EndUtc</c>).
/// </param>
/// <param name="SegmentWidthTicks">
/// <see cref="HistoryCursorKind.Raw"/> reverse reads on a forward-only backend only (Gitea #686): the segment width the
/// <see cref="HistoryCursorKind.Raw"/> reverse reads on a forward-only backend only: the segment width the
/// walk-back ended on, so the next page starts at the observed density instead of re-discovering it. 0 = none.
/// </param>
/// <param name="EmptyFromTicks">
/// Walked reverse reads only (Gitea #691): with <paramref name="EmptyToTicks"/>, a stretch <c>(from, to)</c> the previous
/// Walked reverse reads only: with <paramref name="EmptyToTicks"/>, a stretch <c>(from, to)</c> the previous
/// page's walk proved holds no row, so the next page steps over it rather than re-walking it (to the 1970 floor, ~14
/// reads, at the end of a deep page-through). 0/0 = none. The cursor lives in the session's in-memory store (never
/// serialized), so a new field with a "none" default is all the versioning it needs.
/// </param>
/// <param name="EmptyToTicks">The exclusive upper end of that stretch.</param>
/// <param name="PendingEndBound">
/// <see cref="HistoryCursorKind.Raw"/> with <c>ReturnBounds = true</c> only (Gitea #691): the end bound still owed —
/// <see cref="HistoryCursorKind.Raw"/> with <c>ReturnBounds = true</c> only: the end bound still owed —
/// Part 11 returns it with the last page. <c>null</c> = bounds not requested.
/// </param>
/// <param name="WithinTieCluster">
/// <see cref="HistoryCursorKind.Raw"/> only (Gitea #692): the previous page was a slice of an oversized tie cluster at
/// <see cref="HistoryCursorKind.Raw"/> only: the previous page was a slice of an oversized tie cluster at
/// <paramref name="NextStartUtc"/> that still has un-emitted ties — the next page over-fetches the cluster directly
/// instead of first re-reading <c>N + skip + 1</c> rows that are known to be ties.
/// </param>
@@ -87,7 +87,7 @@ internal sealed record HistoryContinuationState(
HistoryEndBound? PendingEndBound = null,
bool WithinTieCluster = false)
{
/// <summary>The walk-back hint this cursor carries (#686/#689/#691).</summary>
/// <summary>The walk-back hint this cursor carries.</summary>
public ReverseWalkHint WalkHint => new(SegmentWidthTicks, EmptyFromTicks, EmptyToTicks);
}
@@ -97,10 +97,10 @@ internal enum HistoryCursorKind
/// <summary>HistoryReadRaw (values).</summary>
Raw,
/// <summary>HistoryReadEvents (#669).</summary>
/// <summary>HistoryReadEvents.</summary>
Events,
/// <summary>HistoryReadRaw with <c>IsReadModified = true</c> — the Part 11 modification trail (#668).</summary>
/// <summary>HistoryReadRaw with <c>IsReadModified = true</c> — the Part 11 modification trail.</summary>
Modified,
}
@@ -260,9 +260,9 @@ internal static class HistoryPaging
/// <param name="endUtc">The (inclusive) upper bound of the read window; unchanged across pages.
/// The forward window is end-EXCLUSIVE (Part 11; the <c>IHistorianDataSource.ReadRawAsync</c> contract), so a drained
/// cluster continues only while <c>next</c> is strictly before <paramref name="endUtc"/> truncated to
/// <paramref name="resolutionTicks"/>. (OpcUaServer-003 had kept <c>next &lt;= endUtc</c> as "the conservative side",
/// <paramref name="resolutionTicks"/>. (An earlier version kept <c>next &lt;= endUtc</c> as "the conservative side",
/// but it was not: resuming AT EndTime makes the next read a <c>start == end</c> point read, which returns the samples
/// at EndTime as data — #692 review F1; on a microsecond backend EndTime is truncated first.)</param>
/// at EndTime as data; on a microsecond backend EndTime is truncated first.)</param>
/// <param name="sliceStart">The index into the cluster the emitted slice starts at (clamped to the count).</param>
/// <param name="sliceCount">How many ties the emitted slice contains (may be <c>0</c> on a stale-skip self-heal).</param>
/// <param name="nextStartUtc">The next page's inclusive start: <paramref name="boundaryT"/> while the
@@ -306,7 +306,7 @@ internal static class HistoryPaging
{
var next = boundaryT.AddTicks(resolutionTicks);
// The forward window is end-EXCLUSIVE, at the backend's resolution: resuming AT EndTime would turn the next read
// into a start == end point read, which returns the samples at EndTime as data (#692 review F1).
// into a start == end point read, which returns the samples at EndTime as data.
if (next.Ticks < endUtc.Ticks - endUtc.Ticks % resolutionTicks) { nextStartUtc = next; nextSkip = 0; }
else { nextStartUtc = null; nextSkip = 0; }
}
@@ -53,7 +53,7 @@ public sealed class OpcUaApplicationHostOptions
public string PkiStoreRoot { get; set; } = "pki";
/// <summary>
/// Whether anonymous sessions may connect at all (#520). When <see langword="false"/> the
/// Whether anonymous sessions may connect at all. When <see langword="false"/> the
/// Anonymous token policy is not advertised AND anonymous activation is rejected, so a client
/// must present an API key.
/// </summary>
@@ -272,13 +272,14 @@ public sealed class OpcUaApplicationHost : IAsyncDisposable
/// (<c>GetAwaiter().GetResult()</c> under <see cref="CancellationToken.None"/>) is irreducible: the
/// callback must complete inline. Because the SDK gives no timeout, the hard wall-clock bound + bounded
/// concurrency + directory-outage circuit that keep a slow/hung directory from wedging the SDK live
/// inside the authenticator — NOT here. (#520 replaced the LDAP authenticator with
/// inside the authenticator — NOT here. (The LDAP authenticator was replaced with
/// <c>ApiKeyOpcUaUserAuthenticator</c>, whose verification does no network I/O at all, so the
/// bound/concurrency/circuit machinery that used to live there is gone rather than relocated.)
/// </remarks>
/// <param name="authenticator">The user authenticator to validate credentials.</param>
/// <param name="args">The impersonation event arguments to process.</param>
/// <param name="logger">The logger for diagnostic output.</param>
/// <param name="allowAnonymous">Whether anonymous sessions may connect.</param>
internal static void HandleImpersonation(
IOpcUaUserAuthenticator authenticator,
ImpersonateEventArgs args,
@@ -344,10 +345,10 @@ public sealed class OpcUaApplicationHost : IAsyncDisposable
/// <summary>
/// Admits or rejects an anonymous session, and — when admitted — attaches the roles the
/// <c>anonymous</c> principal has been granted (#520).
/// <c>anonymous</c> principal has been granted.
/// </summary>
/// <remarks>
/// Before #520 this path simply returned, leaving the SDK's default identity in place: anonymous
/// Previously this path simply returned, leaving the SDK's default identity in place: anonymous
/// always connected and carried no roles. Two things change. Anonymous can now be refused
/// outright, and when admitted it is a normal principal whose grants come from ACL rows, so it
/// can be given read or write like any key. The identity attached is the same
@@ -380,7 +381,7 @@ public sealed class OpcUaApplicationHost : IAsyncDisposable
catch (Exception ex)
{
// Fail closed. An anonymous session whose grants could not be resolved must not fall through
// to the SDK default identity, because that would silently ADMIT it — the pre-#520
// to the SDK default identity, because that would silently ADMIT it — the previous
// behaviour — at exactly the moment we could not determine what it is allowed to do.
logger.LogError(ex, "OpcUaApplicationHost: anonymous authenticator threw");
args.IdentityValidationError = new ServiceResult(StatusCodes.BadIdentityTokenRejected,
@@ -534,6 +535,7 @@ public sealed class OpcUaApplicationHost : IAsyncDisposable
/// project supplies the LDAP adapter, and <see cref="NullOpcUaUserAuthenticator"/> denies all
/// UserName logins when none is registered.
/// </summary>
/// <param name="allowAnonymous">Whether the Anonymous policy is advertised.</param>
/// <returns>The Anonymous and UserName token policies.</returns>
internal static IEnumerable<UserTokenPolicy> BuildUserTokenPolicies(bool allowAnonymous = true)
{
File diff suppressed because it is too large Load Diff
@@ -68,7 +68,7 @@ public sealed class OtOpcUaSdkServer : StandardServer
}
/// <summary>
/// Gitea #597 — wire the redundancy verdict that decides whether this node accepts an OPC UA Acknowledge
/// Wire the redundancy verdict that decides whether this node accepts an OPC UA Acknowledge
/// of a NATIVE condition (<see cref="OtOpcUaNodeManager.NativeAlarmAckPrimaryGate"/>); on any other node
/// the ack is refused with <c>BadInvalidState</c> instead of being applied locally and reverted by the
/// driver's next transition. Passing <c>null</c> clears it (allow). No-op (returns <c>false</c>) when the
@@ -84,7 +84,7 @@ public sealed class OtOpcUaSdkServer : StandardServer
}
/// <summary>
/// Gitea #674 — wire the redundancy verdict that decides whether this node serves an OPC UA HistoryUpdate
/// Wire the redundancy verdict that decides whether this node serves an OPC UA HistoryUpdate
/// (<see cref="OtOpcUaNodeManager.HistoryUpdatePrimaryGate"/>); on any other node every authorized node of a
/// HistoryUpdate is refused <c>BadInvalidState</c>. Passing <c>null</c> clears it (allow). No-op (returns
/// <c>false</c>) when the node manager has not been created yet (mirrors <see cref="SetNativeAlarmAckPrimaryGate"/>).
@@ -163,7 +163,7 @@ public sealed class OtOpcUaSdkServer : StandardServer
}
/// <summary>
/// Wire the node's data-plane authorization inputs (#520 stage 4) onto the created
/// Wire the node's data-plane authorization inputs onto the created
/// <see cref="OtOpcUaNodeManager"/> — the cluster it serves, the current auth generation, and the
/// ACL grants. The host calls this after start with the DI-resolved
/// <see cref="IDataPlaneAuthoritySource"/>, which the artifact-apply path refreshes on every
@@ -185,7 +185,7 @@ public sealed class OtOpcUaSdkServer : StandardServer
}
/// <summary>
/// Wire the node-scoped ACL gate (#520 stage 5) onto the created <see cref="OtOpcUaNodeManager"/>.
/// Wire the node-scoped ACL gate onto the created <see cref="OtOpcUaNodeManager"/>.
/// The host calls this after start; passing <c>null</c> detaches it, which returns the write and
/// alarm seams to their server-wide role checks and leaves HistoryRead ungated. No-op (returns
/// <c>false</c>) when the node manager has not been created yet, mirroring
@@ -200,13 +200,11 @@ public sealed class OtOpcUaSdkServer : StandardServer
return true;
}
/// <summary>
/// Gitea #682 — keep the SDK's full set of calculator factories (live-data <c>AggregateFilter</c> subscriptions
/// need them, and <c>ServerCapabilities/AggregateFunctions</c> keeps listing all of them), then trim
/// <c>HistoryServerCapabilities/AggregateFunctions</c> to the node manager's current historian source. At this
/// point that is the Null default (no history aggregates); the Host's <see cref="SetHistorianDataSource"/>
/// re-syncs to the configured backend's set right after start.
/// </summary>
// Keep the SDK's full set of calculator factories (live-data AggregateFilter subscriptions need
// them, and ServerCapabilities/AggregateFunctions keeps listing all of them), then trim
// HistoryServerCapabilities/AggregateFunctions to the node manager's current historian source. At
// this point that is the Null default (no history aggregates); the Host's SetHistorianDataSource
// re-syncs to the configured backend's set right after start.
/// <inheritdoc />
protected override AggregateManager CreateAggregateManager(
IServerInternal server, ApplicationConfiguration configuration)
@@ -10,11 +10,11 @@ namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
internal readonly record struct RawPagePlan(int Limit, uint PageCap, uint RequestCap, bool NoRoom);
/// <summary>
/// Gitea #694: sizes a HistoryRead-Raw page to what the backend can return in one read
/// sizes a HistoryRead-Raw page to what the backend can return in one read
/// (<see cref="IHistorianDataSource.MaxRawValuesPerRead"/> = L — a strict HistorianGateway's learned row ceiling, less
/// its boundary-row allowance). With a limit the read — page P + boundary ties k + the #692 lookahead row — is at most L,
/// its boundary-row allowance). With a limit the read — page P + boundary ties k + the lookahead row — is at most L,
/// so P = min(want, L − k − 1) (all values: P = L − k − 1); a full page carries a continuation point like any other, as
/// Part 11 allows fewer values than <c>NumValuesPerNode</c> with one. Before #694 a cap above a strict gateway's ceiling
/// Part 11 allows fewer values than <c>NumValuesPerNode</c> with one. Previously a cap above a strict gateway's ceiling
/// (or an uncapped read of a window holding more) failed <c>BadTooManyOperations</c>.
/// </summary>
/// <remarks>
@@ -8,7 +8,7 @@ namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
internal readonly record struct ReverseEventsPage(List<HistoricalEvent> Events, ReverseWalkHint Hint);
/// <summary>
/// Gitea #691.4: serves a Part 11 reverse events read — <c>(lo, hi]</c> newest-first — on a backend that reads events
/// Serves a Part 11 reverse events read — <c>(lo, hi]</c> newest-first — on a backend that reads events
/// forward only (<see cref="IHistorianDataSource.SupportsReverseEvents"/> = <c>false</c>: the Gateway) with the
/// <see cref="ReverseWalk"/>. A segment read is cut short when the source flags truncation (its continuation point); ties
/// are ordered by <see cref="EventIdTieOrder"/> because the gateway orders by event time only.
@@ -12,9 +12,9 @@ internal readonly record struct ReverseRawPage(IReadOnlyList<DataValueSnapshot>
}
/// <summary>
/// Gitea #686: serves a Part 11 reverse raw read — <c>(lo, hi]</c> newest-first, capped — on a historian backend that can
/// Serves a Part 11 reverse raw read — <c>(lo, hi]</c> newest-first, capped — on a historian backend that can
/// only read forward (<see cref="IHistorianDataSource.SupportsReverseRaw"/> = <c>false</c>: the Gateway, whose
/// <c>ReadRaw</c> streams ascending and rejects <c>start &gt; end</c>). The walk itself — segment sizing (#689), the
/// <c>ReadRaw</c> streams ascending and rejects <c>start &gt; end</c>). The walk itself — segment sizing, the
/// truncation rules, edges, ties and bounds — is <see cref="ReverseWalk"/>; this adapter supplies the raw read (a read is
/// cut short when it returned its full cap) and keeps the backend's tie order.
/// </summary>
@@ -59,7 +59,7 @@ internal static class ReverseRawReader
/// <returns>The page, newest first, and the hint for the next page.</returns>
/// <exception cref="HistoryReadLimitExceededException">One timestamp holds more than the tie budget.</exception>
/// <remarks>
/// Gitea #694: every segment read fits the backend's <see cref="IHistorianDataSource.MaxRawValuesPerRead"/> (a strict
/// Every segment read fits the backend's <see cref="IHistorianDataSource.MaxRawValuesPerRead"/> (a strict
/// gateway's learned ceiling) — the walk's tie budget is bounded by it so its segments are sized for it, and a
/// crowded re-read asking more is cut to it (and counts as truncated, never as complete). A walk that TEACHES the
/// backend its limit (the first read after start-up) and is refused for it is re-run once with segments sized for the
@@ -109,7 +109,7 @@ internal static class ReverseRawReader
}
catch (HistoryReadLimitExceededException ex) when (asked > 0 && ex.PreWindowRows > 0 && attempt < 2)
{
// #695: the discovery request may be smaller than the pre-window cluster. Size against
// The discovery request may be smaller than the pre-window cluster. Size against
// the ceiling, not that request; a second pass can discover more crowding rows.
var ceilingRoom = source.MaxRawValuesPerRead is var learned and > 0 ? learned : asked;
var smaller = Math.Min(asked - 1, ceilingRoom - ex.PreWindowRows - 1);
@@ -6,7 +6,7 @@ namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
/// <param name="WidthTicks">The segment width the walk ended on, aimed at the page's density — the next page's first width (0 = none).</param>
/// <param name="EmptyFromTicks">
/// With <paramref name="EmptyToTicks"/>: a stretch <c>(EmptyFrom, EmptyTo)</c> (both exclusive) a complete segment read
/// proved holds no row (#691) — typically from the oldest row the page saw down to the walk's floor. A resumed page
/// proved holds no row — typically from the oldest row the page saw down to the walk's floor. A resumed page
/// steps straight over it instead of re-walking it. Both 0 = none.
/// </param>
/// <param name="EmptyToTicks">The exclusive upper end of the empty stretch.</param>
@@ -23,7 +23,7 @@ internal readonly record struct ReverseWalkHint(long WidthTicks, long EmptyFromT
internal readonly record struct ForwardSegmentRead<T>(IReadOnlyList<T> Rows, bool Truncated);
/// <summary>
/// Gitea #686/#689: the walk-back that serves a Part 11 reverse read — <c>(lo, hi]</c> newest-first, capped — from a
/// The walk-back that serves a Part 11 reverse read — <c>(lo, hi]</c> newest-first, capped — from a
/// backend that can only read FORWARD. Shared by raw values (<see cref="ReverseRawReader"/>) and events; the row type
/// only has to expose a timestamp.
/// </summary>
@@ -36,7 +36,7 @@ internal readonly record struct ForwardSegmentRead<T>(IReadOnlyList<T> Rows, boo
/// it newest-first, and step to the next older segment until the cap is met or <c>lo</c> is reached. The first
/// segment is <see cref="InitialSegment"/> wide, or the width the previous page of the same read ended on (carried in
/// the continuation point). After each read the next width is re-aimed from the density just observed at about half
/// the PAGE budget <c>2N + 16</c> (≈ N + 8 rows), growing at most ×4 per step (#689 — it used to aim at half the tie
/// the PAGE budget <c>2N + 16</c> (≈ N + 8 rows), growing at most ×4 per step (it used to aim at half the tie
/// budget, ~32k rows, whatever N was) — so a live tag's "latest N" is usually one read of about N rows, and sparse
/// history is found in a few dozen tiny reads.
/// </para>
@@ -59,7 +59,7 @@ internal readonly record struct ForwardSegmentRead<T>(IReadOnlyList<T> Rows, boo
/// requests are the same request, and the Gateway stores milliseconds).
/// </para>
/// <para>
/// <b>Proving the rest empty (#691).</b> Walking down to the floor through empty history used to take one read per ×4
/// <b>Proving the rest empty.</b> Walking down to the floor through empty history used to take one read per ×4
/// growth step (~14 reads from a minute to the epoch) — on every page that ran out of rows. After two consecutive empty
/// segments the walk asks once per page for the WHOLE remainder <c>(lo, segHi]</c> at the page budget: a complete
/// answer ends the walk in one read; a truncated one (deep history) is discarded and the walk carries on as before. And
@@ -71,7 +71,7 @@ internal readonly record struct ForwardSegmentRead<T>(IReadOnlyList<T> Rows, boo
/// <b>Edges.</b> A segment is requested as <c>[⌊segLo⌋, ⌈segHi + 1 tick⌉]</c>, both rounded outward to the millisecond
/// (the gateway's / AVEVA's resolution), and filtered to <c>(segLo, segHi]</c> on the rows' own timestamps — exact
/// whether the backend's forward end is exclusive or inclusive and whether it truncates its bounds; a row fabricated at
/// the (millisecond) query start can never land inside the segment (#687). Adjacent segments share no timestamp.
/// the (millisecond) query start can never land inside the segment. Adjacent segments share no timestamp.
/// </para>
/// <para>
/// <b>Ties</b> come back in the backend's forward order reversed, or — with a tie order given (events, whose gateway
@@ -94,10 +94,10 @@ internal static class ReverseWalk
/// <summary>How far past "now" the walk starts at most.</summary>
internal static readonly TimeSpan LookAhead = TimeSpan.FromDays(1);
/// <summary>Slack added to a page's row budget (#689): room for density variation between segments.</summary>
/// <summary>Slack added to a page's row budget: room for density variation between segments.</summary>
internal const int PageSlack = 16;
/// <summary>The most rows a discovery segment (see the remarks) may read before it counts as truncated (#689).</summary>
/// <summary>The most rows a discovery segment (see the remarks) may read before it counts as truncated.</summary>
internal const int DiscoveryRows = 1024;
/// <summary>Request bounds are rounded outward to this (the gateway / AVEVA timestamp resolution).</summary>
@@ -123,7 +123,7 @@ internal static class ReverseWalk
/// <param name="hint">What the previous page of the same read carried (default = none).</param>
/// <param name="tooManyAtOneTimestamp">Builds the exception for a timestamp holding more than M rows.</param>
/// <param name="ct">Cancellation.</param>
/// <param name="useDiscoveryBudgetForGaps">Use ceiling-sized discovery and retain truncated remainder rows (#696, strict raw backends only).</param>
/// <param name="useDiscoveryBudgetForGaps">Use ceiling-sized discovery and retain truncated remainder rows (strict raw backends only).</param>
/// <returns>At most <paramref name="want"/> rows, newest first, and the hint for the next page.</returns>
public static async Task<(List<T> Rows, ReverseWalkHint Next)> WalkAsync<T>(
Func<DateTime, DateTime, int, CancellationToken, Task<ForwardSegmentRead<T>>> read,
@@ -164,8 +164,8 @@ internal static class ReverseWalk
// (known + lowerBy, segHi] with lowerBy growing ×4, `known` following what each truncated read saw — until a read
// comes back empty (the top is now bracketed below its segLo), then BISECT that bracket. Any complete read holding
// rows ends the search. A burst that ended long before segHi is found in a few reads instead of bisecting the whole
// gap down to the millisecond, and a long dense stretch is crossed geometrically, not a budget at a time (#691.4
// review). `noGallop` falls back to plain top-anchored halving if a galloping read is crowded by rows before it.
// gap down to the millisecond, and a long dense stretch is crossed geometrically, not a budget at a time
// `noGallop` falls back to plain top-anchored halving if a galloping read is crowded by rows before it.
var known = 0L;
var knownWidth = 0L;
var lowerBy = 0L;
@@ -173,7 +173,7 @@ internal static class ReverseWalk
var noGallop = false;
var segHi = hiTicks;
// #691: the remainder probe (once per page, after two empty segments) and the empty stretches.
// The remainder probe (once per page, after two empty segments) and the empty stretches.
var emptyRun = 0;
var probed = false;
var carried = hint.HasEmptyStretch ? (hint.EmptyFromTicks, hint.EmptyToTicks) : (0L, 0L);
@@ -198,7 +198,7 @@ internal static class ReverseWalk
bisected = !lowered && (bisecting || lowerBy > 0) && gap > 2 * Math.Max(granularity, knownWidth);
// Never narrower than the request granularity: requests are rounded outward to it, so a narrower segment
// re-sends the same request — and a width left at one tick (a tie cluster's) stepped segHi down a tick per
// read, ~10,000 identical reads (#691.4 re-review). Keep the Min: a truncated read crowded by rows before
// read, ~10,000 identical reads. Keep the Min: a truncated read crowded by rows before
// the segment must still shrink the segment.
w = lowered ? gap - lowerBy
: bisected ? gap / 2
@@ -222,7 +222,7 @@ internal static class ReverseWalk
if (probe)
{
// #696: strict-ceiling discovery retains the rows/density instead of discarding the remainder probe.
// Strict-ceiling discovery retains the rows/density instead of discarding the remainder probe.
probed = true;
if (!useDiscoveryBudgetForGaps)
{
@@ -260,8 +260,8 @@ internal static class ReverseWalk
{
// A segment no wider than the request granularity (1 ms — narrower requests are the same request) still
// over its budget: a tie cluster, or a burst inside one millisecond. Escalate to the tie budget M before
// refusing — up to M rows within one millisecond are served (#686); more are refused, per millisecond
// (#691.4 re-review — exact for the millisecond-resolution Gateway).
// refusing — up to M rows within one millisecond are served; more are refused, per millisecond
// (exact for the millisecond-resolution Gateway).
if (segBudget < budget)
{
segBudget = budget;
@@ -442,13 +442,16 @@ internal static class ReverseWalk
/// <summary>
/// Orders events within one timestamp by <see cref="HistoricalEvent.EventId"/> (ordinal) — the tie order a walked-back
/// events read (#691.4) and its oversized-cluster over-fetch share, because the Gateway orders by event time only.
/// events read and its oversized-cluster over-fetch share, because the Gateway orders by event time only.
/// </summary>
internal sealed class EventIdTieOrder : IComparer<HistoricalEvent>
{
/// <summary>The shared instance.</summary>
public static readonly EventIdTieOrder Instance = new();
/// <inheritdoc />
/// <summary>Orders events by ordinal comparison of their event ids.</summary>
/// <param name="x">The first event.</param>
/// <param name="y">The second event.</param>
/// <returns>A signed integer giving the relative order of the two event ids.</returns>
public int Compare(HistoricalEvent? x, HistoricalEvent? y) => string.CompareOrdinal(x?.EventId, y?.EventId);
}
@@ -25,16 +25,16 @@ public sealed class SdkAddressSpaceSink : IOpcUaAddressSpaceSink, ISurgicalAddre
=> _nodeManager.WriteValue(nodeId, value, statusCode, sourceTimestampUtc, realm);
/// <inheritdoc />
/// <remarks>Overrides the interface's default implementation on purpose: that default loops
/// <see cref="WriteValue"/>, which would re-take the node manager's SDK-wide <c>Lock</c> once per value.
/// Forwarding to the manager's own batched entry point takes it ONCE for the whole batch.</remarks>
// Overrides the interface's default implementation on purpose: that default loops
// WriteValue, which would re-take the node manager's SDK-wide Lock once per value.
// Forwarding to the manager's own batched entry point takes it ONCE for the whole batch.
public void WriteValues(IReadOnlyList<ValueWrite> values)
=> _nodeManager.WriteValues(values);
/// <inheritdoc />
/// <remarks>Overrides the interface's default on purpose, and here the default is not merely slower but
/// <b>wrong</b>: it writes a null value (a value-less sink has nothing else to write), which would erase
/// the last known value this annotation exists to preserve. The manager's own entry point retains it.</remarks>
// Overrides the interface's default on purpose, and here the default is not merely slower but
// wrong: it writes a null value (a value-less sink has nothing else to write), which would erase
// the last known value this annotation exists to preserve. The manager's own entry point retains it.
public void WriteStatuses(IReadOnlyList<StatusWrite> statuses)
=> _nodeManager.WriteStatuses(statuses);
@@ -42,6 +42,7 @@ public sealed class SdkAddressSpaceSink : IOpcUaAddressSpaceSink, ISurgicalAddre
public void WriteAlarmCondition(string alarmNodeId, AlarmConditionSnapshot state, DateTime sourceTimestampUtc, AddressSpaceRealm realm)
=> _nodeManager.WriteAlarmCondition(alarmNodeId, state, sourceTimestampUtc, realm);
/// <inheritdoc />
public void WriteAlarmQuality(string alarmNodeId, uint statusCode, DateTime sourceTimestampUtc, AddressSpaceRealm realm)
=> _nodeManager.WriteAlarmQuality(alarmNodeId, statusCode, sourceTimestampUtc, realm);
@@ -7,7 +7,7 @@ using ZB.MOM.WW.OtOpcUa.Core.Authorization;
namespace ZB.MOM.WW.OtOpcUa.OpcUaServer.Security;
/// <summary>
/// Turns an inbound OPC UA request into a node-scoped ACL decision (#520, stage 5). The one place
/// Turns an inbound OPC UA request into a node-scoped ACL decision. The one place
/// the address space's <see cref="NodeId"/> meets <see cref="IPermissionEvaluator"/>.
/// </summary>
/// <remarks>
@@ -118,7 +118,7 @@ public sealed class DataPlaneAuthorizer
public TimeProvider Clock => _time;
/// <summary>
/// Memoized grant walks for the request-rate seams (#520 stage 6). See
/// Memoized grant walks for the request-rate seams. See
/// <see cref="SessionAclDecisionCache"/> for what it is and is not allowed to cache.
/// </summary>
public SessionAclDecisionCache Decisions { get; } = new();
@@ -204,7 +204,7 @@ public sealed class DataPlaneAuthorizer
/// <summary>
/// Whether the API key behind <paramref name="identity"/> is still usable — consulted by the two
/// server-wide role gates (<c>WriteOperate</c>, <c>AlarmAck</c>) <b>regardless of
/// <see cref="Enabled"/></b> (Gitea #563).
/// <see cref="Enabled"/></b>.
/// </summary>
/// <remarks>
/// <para>
@@ -26,7 +26,7 @@ public interface IOpcUaUserAuthenticator
Task<OpcUaUserAuthResult> AuthenticateUserNameAsync(string username, string password, CancellationToken ct);
/// <summary>
/// Resolves what an <b>anonymous</b> session is allowed to do (#520). Anonymous is a normal
/// Resolves what an <b>anonymous</b> session is allowed to do. Anonymous is a normal
/// principal — <see cref="OpcUaPrincipals.Anonymous"/> — not a special case, so it can be granted
/// read or write through ordinary ACL rows.
/// </summary>
@@ -38,7 +38,7 @@ public interface IOpcUaUserAuthenticator
/// </para>
/// <para>
/// The default implementation admits anonymous with <b>no roles</b>, which is exactly the
/// behaviour before #520: an anonymous session connects, and every role-gated operation
/// behaviour before per-key ACLs: an anonymous session connects, and every role-gated operation
/// (write, alarm ack) denies. Implementors that can resolve grants override it; the rest
/// keep the safe status quo rather than being forced to reimplement it.
/// </para>
@@ -53,8 +53,8 @@ public interface IOpcUaUserAuthenticator
/// <summary>Outcome of a UserName authentication attempt. <see cref="Roles"/> populates the session identity's role set.</summary>
/// <remarks>
/// <para>
/// ⚠️ <b><see cref="DisplayName"/> is not the principal, and assuming it was is a live trap</b>
/// (#520 stage 5). The authenticator passes the principal as the display name, but
/// ⚠️ <b><see cref="DisplayName"/> is not the principal, and assuming it was is a live trap</b>.
/// The authenticator passes the principal as the display name, but
/// <c>RoleCarryingUserIdentity</c> derives <c>UserIdentity.DisplayName</c> from the presented
/// <b>token</b> — which for a key-bearing client is the static username <c>apikey</c>, the same
/// for every key in the fleet. So the principal was being dropped on the floor at the identity
@@ -27,7 +27,7 @@ public sealed class RoleCarryingUserIdentity : UserIdentity
/// <summary>
/// Initializes a new instance carrying the ACL principal and the authenticating key id alongside
/// the roles (#520 stage 5).
/// the roles.
/// </summary>
/// <param name="token">The user identity token the SDK handed to the impersonation handler.</param>
/// <param name="roles">The roles resolved by the authenticator.</param>
@@ -6,7 +6,7 @@ namespace ZB.MOM.WW.OtOpcUa.OpcUaServer.Security;
/// <summary>
/// Memoizes the <b>grant-walk</b> half of an ACL decision per <c>(session, node, operation)</c> for one
/// authorization generation (#520 stage 6).
/// authorization generation.
/// </summary>
/// <remarks>
/// <para>
@@ -3,7 +3,7 @@ using Opc.Ua;
namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
/// <summary>
/// The Part 13 <see cref="AggregateConfiguration"/> processed reads are evaluated under (#677), and the rule for a
/// The Part 13 <see cref="AggregateConfiguration"/> processed reads are evaluated under, and the rule for a
/// client-supplied one in <c>ReadProcessedDetails</c>.
/// </summary>
/// <remarks>
@@ -11,7 +11,7 @@ namespace ZB.MOM.WW.OtOpcUa.OpcUaServer;
/// The aggregate evaluators (<c>AggregateEvaluator</c> / <c>TimeWeightedAggregator</c> in
/// <c>Driver.Historian.Sql.Common</c>) are written against fixed settings, not parameterised: Uncertain time counts as
/// Good (<see cref="TreatUncertainAsBad"/> = false) in the time-weighted family; the per-sample Average / Minimum /
/// Maximum / Range / *ActualTime / Count are defined by Part 13 over Good values whatever this setting (#684), as the
/// Maximum / Range / *ActualTime / Count are defined by Part 13 over Good values whatever this setting, as the
/// SDK computes them under it; an interval is Good only when all of
/// it is (<see cref="PercentDataGood"/> = 100) and Bad only when none of it is non-Bad
/// (<see cref="PercentDataBad"/> = 100), otherwise <c>UncertainDataSubNormal</c>; the value past the last sample