2e0743ad25
H1 (HIGH): write-routing key now (AddressSpaceRealm, bareId), not bare-only. A raw s=<RawPath> and a UNS s=<Area/Line/Equip/Eff> can collide as bare strings; the bare-only key let a colliding raw+UNS pair route to the WRONG driver ref (last-writer-wins). The realm the node manager resolves (RealmOf) is now threaded through IOpcUaNodeWriteGateway.WriteAsync -> RouteNodeWrite -> _driverRefByNodeId keyed by (realm, bareId). New regression test: Colliding_raw_and_uns_bare_ids_route_to_their_own_driver_by_realm. M1 (MEDIUM): discovered-node injection made coherently DORMANT. HandleDiscoveredNodes hard-short-circuits (single enforcement point; _discoveredByDriver never populates so the re-inject tail is inert too), with a clear log pointing at the /raw browse-commit flow. New pin: Discovered_nodes_are_ignored_dormant_in_v3; the 16+2 v2 injection scenarios re-pointed to an accurate skip reason (DiscoveryInjectionDormantV3). M2 (MEDIUM): realm-qualified dual-node self-correction tests — Failed_uns_write_reverts_uns_node_and_leaves_raw_node_untouched + Raw_realm_revert_reverts_raw_node_only (the second fails if the realm is dropped). L1: removed the = AddressSpaceRealm.Uns defaults from the consequential node-manager mutation methods (WriteValue/WriteAlarmCondition/MaterialiseAlarmCondition/ EnsureFolder/EnsureVariable/UpdateFolderDisplayName/UpdateTagAttributes/ RaiseNodesAddedModelChange/Remove*/RevertOptimisticWriteIfNeeded) + the AttributeValueUpdate/AlarmStateUpdate records, so the compiler forces explicit realm; read-only accessors + internal builders retain their defaults. L3: fixed the stale VirtualTagHostActor class comment (V3NodeIds.Uns, not the retired EquipmentNodeIds.Variable). Also: DeploymentArtifactRawUnsParityTests — Raw/UNS node-set byte-parity round-trip between AddressSpaceComposer.Compose and DeploymentArtifact.ParseComposition. Claude-Session: https://claude.ai/code/session_01LVneM3eh1UtJxEisFXgmox
40 lines
3.0 KiB
C#
40 lines
3.0 KiB
C#
namespace ZB.MOM.WW.OtOpcUa.Runtime.Tests.Drivers;
|
|
|
|
/// <summary>
|
|
/// Shared xUnit <c>Skip</c> reason constants for tests whose intent is retained but whose subject is
|
|
/// not materialized in the v3 Batch-1 DARK address space. Equipment-tag variable nodes (and their
|
|
/// per-field intent: FullName / array / historize / native-alarm) are lit up by the Batch-4 dual
|
|
/// namespace + UNS↔Raw fan-out; until then the composer/artifact both emit an EMPTY equipment-tag
|
|
/// plan set, so any parity assertion over those plans has nothing to compare. The raw-tag parse
|
|
/// intent these tests characterized lives on in <see cref="TagConfigCorpusParityTests"/> (RawTagEntry
|
|
/// round-trip) and <c>TagConfigIntentTests</c> (the parse unit).
|
|
/// </summary>
|
|
internal static class DarkAddressSpaceReasons
|
|
{
|
|
/// <summary>Equipment-tag variable materialization + its per-field intent is dark until Batch 4.</summary>
|
|
public const string EquipmentTagsDarkBatch4 =
|
|
"v3 dark address space: equipment-tag variable plans (FullName/array/historize/alarm) do not " +
|
|
"materialize until Batch 4 (dual-namespace UNS↔Raw fan-out). The composer + artifact both emit an " +
|
|
"empty equipment-tag plan set this batch, so this parity has nothing to compare. Raw-tag parse " +
|
|
"intent is covered by TagConfigCorpusParityTests (RawTagEntry round-trip) + TagConfigIntentTests.";
|
|
|
|
/// <summary>Discovered-node INJECTION is dormant in v3 (Wave-B review M1). The v2 path grafted a driver's
|
|
/// FixedTree under an equipment folder (equipment bound a driver); v3 retired that binding and discovered
|
|
/// raw tags are authored explicitly via the Batch-2 <c>/raw</c> browse-commit flow. <c>HandleDiscoveredNodes</c>
|
|
/// hard-short-circuits, so these v2 injection scenarios have no live path to assert; re-migrating injection
|
|
/// onto the raw device subtree is a separate follow-up. The dormant guard itself is pinned by
|
|
/// <c>DriverHostActorDiscoveryTests.Discovered_nodes_are_ignored_dormant_in_v3</c>.</summary>
|
|
public const string DiscoveryInjectionDormantV3 =
|
|
"v3: discovered-node injection is DORMANT (Wave-B review M1) — equipment no longer binds a driver, so the " +
|
|
"v2 FixedTree-under-equipment graft has no live path. Discovered raw tags are authored via the /raw " +
|
|
"browse-commit flow. HandleDiscoveredNodes short-circuits (pinned by Discovered_nodes_are_ignored_dormant_in_v3); " +
|
|
"re-migrating injection onto the raw device subtree is a separate follow-up.";
|
|
|
|
/// <summary>Equipment↔device host binding is architecturally retired in v3.</summary>
|
|
public const string EquipmentDeviceBindingRetired =
|
|
"v3: equipment no longer binds a driver/device (EquipmentNode has no DriverInstanceId/DeviceId/" +
|
|
"DeviceHost) — equipment references raw tags via UnsTagReference. The device-endpoint merge this " +
|
|
"test characterized is now covered by DeploymentArtifactRawPathTests " +
|
|
"(ParseDriverInstances_computes_nested_RawPath_and_merges_device_endpoint).";
|
|
}
|