fix(v3-batch4): thread ReferencingEquipmentPaths into native AlarmTransitionEvent
Closes the WP3/WP4 boundary seam WP4 flagged: ForwardNativeAlarm (DriverHostActor, a WP3-owned file WP4 could not edit) built the AlarmTransitionEvent without the referencing-equipment paths, so the /alerts equipment-list chips WP4 added never populated in production (would fail live-gate leg 5). The RawTagPlan already carries ReferencingEquipmentPaths (the Area/Line/Equipment UNS folder paths); this rides them onto the per-condition alarm meta and into every transition. Coordinator-owned 1-file change (WP3 merged, no parallel agent owns this file this wave). Claude-Session: https://claude.ai/code/session_01LVneM3eh1UtJxEisFXgmox
This commit is contained in:
@@ -171,7 +171,7 @@ public sealed class DriverHostActor : ReceiveActor, IWithTimers
|
|||||||
/// <c>TagConfig.alarm.historizeToAveva</c>; it is threaded onto the transition so the
|
/// <c>TagConfig.alarm.historizeToAveva</c>; it is threaded onto the transition so the
|
||||||
/// HistorianAdapterActor's <c>is not false</c> gate suppresses the durable AVEVA row only on an
|
/// HistorianAdapterActor's <c>is not false</c> gate suppresses the durable AVEVA row only on an
|
||||||
/// explicit false (mirroring the scripted-alarm opt-out).</summary>
|
/// explicit false (mirroring the scripted-alarm opt-out).</summary>
|
||||||
private readonly Dictionary<string, (string EquipmentId, string Name, string AlarmType, bool? HistorizeToAveva)> _alarmMetaByNodeId =
|
private readonly Dictionary<string, (string EquipmentId, string Name, string AlarmType, bool? HistorizeToAveva, IReadOnlyList<string> ReferencingEquipmentPaths)> _alarmMetaByNodeId =
|
||||||
new(StringComparer.Ordinal);
|
new(StringComparer.Ordinal);
|
||||||
|
|
||||||
/// <summary>Derives a full Part 9 condition snapshot from each native alarm transition delta,
|
/// <summary>Derives a full Part 9 condition snapshot from each native alarm transition delta,
|
||||||
@@ -1048,7 +1048,8 @@ public sealed class DriverHostActor : ReceiveActor, IWithTimers
|
|||||||
if (!serviceAlertsAsPrimary) continue;
|
if (!serviceAlertsAsPrimary) continue;
|
||||||
|
|
||||||
var meta = _alarmMetaByNodeId.TryGetValue(nodeId, out var m)
|
var meta = _alarmMetaByNodeId.TryGetValue(nodeId, out var m)
|
||||||
? m : (EquipmentId: nodeId, Name: nodeId, AlarmType: "AlarmCondition", HistorizeToAveva: (bool?)null);
|
? m : (EquipmentId: nodeId, Name: nodeId, AlarmType: "AlarmCondition", HistorizeToAveva: (bool?)null,
|
||||||
|
ReferencingEquipmentPaths: (IReadOnlyList<string>)Array.Empty<string>());
|
||||||
_mediator.Tell(new Publish(ScriptedAlarmHostActor.AlertsTopic, new AlarmTransitionEvent(
|
_mediator.Tell(new Publish(ScriptedAlarmHostActor.AlertsTopic, new AlarmTransitionEvent(
|
||||||
AlarmId: nodeId,
|
AlarmId: nodeId,
|
||||||
EquipmentPath: meta.EquipmentId,
|
EquipmentPath: meta.EquipmentId,
|
||||||
@@ -1068,7 +1069,10 @@ public sealed class DriverHostActor : ReceiveActor, IWithTimers
|
|||||||
// historize). The HistorianAdapterActor gate (historizeToAveva is not false) historizes null +
|
// historize). The HistorianAdapterActor gate (historizeToAveva is not false) historizes null +
|
||||||
// true and suppresses the durable AVEVA row only on an explicit false — the same posture as the
|
// true and suppresses the durable AVEVA row only on an explicit false — the same posture as the
|
||||||
// scripted-alarm opt-out. null here rides through unchanged (the gate treats it as default-on).
|
// scripted-alarm opt-out. null here rides through unchanged (the gate treats it as default-on).
|
||||||
HistorizeToAveva: meta.HistorizeToAveva)));
|
HistorizeToAveva: meta.HistorizeToAveva,
|
||||||
|
// WP4: the Area/Line/Equipment UNS paths that reference this raw condition — the /alerts row
|
||||||
|
// renders them as the equipment list (empty for a raw condition no equipment references yet).
|
||||||
|
ReferencingEquipmentPaths: meta.ReferencingEquipmentPaths)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1573,8 +1577,10 @@ public sealed class DriverHostActor : ReceiveActor, IWithTimers
|
|||||||
// Inverse 1:1 map for the inbound native-condition ack path (keyed by BARE condition NodeId).
|
// Inverse 1:1 map for the inbound native-condition ack path (keyed by BARE condition NodeId).
|
||||||
_driverRefByAlarmNodeId[t.NodeId] = key;
|
_driverRefByAlarmNodeId[t.NodeId] = key;
|
||||||
// Per-condition metadata for the alerts fan-out. WP4 refines /alerts identity to the referencing
|
// Per-condition metadata for the alerts fan-out. WP4 refines /alerts identity to the referencing
|
||||||
// equipment paths; WP3 keys the display off the RawPath.
|
// equipment paths; WP3 keys the display off the RawPath. The referencing-equipment paths (the
|
||||||
_alarmMetaByNodeId[t.NodeId] = (t.NodeId, t.Name, t.Alarm.AlarmType, t.Alarm.HistorizeToAveva);
|
// Area/Line/Equipment UNS folder paths carried on the RawTagPlan) ride onto every transition so
|
||||||
|
// the /alerts row lists which equipment reference this raw condition.
|
||||||
|
_alarmMetaByNodeId[t.NodeId] = (t.NodeId, t.Name, t.Alarm.AlarmType, t.Alarm.HistorizeToAveva, t.ReferencingEquipmentPaths);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user