feat(alarms): carry AlarmTypeName + operator Comment on AlarmTransitionEvent (historian feed prep)

This commit is contained in:
Joseph Doherty
2026-06-11 11:03:00 -04:00
parent cd72f79ef4
commit 8ac3ac5be9
5 changed files with 61 additions and 4 deletions
@@ -173,6 +173,10 @@ public sealed class ScriptedAlarmHostActorTests : RuntimeActorTestBase
evt.TransitionKind.ShouldBe("Activated");
evt.Severity.ShouldBe(1000); // 800 → Critical bucket → 1000
evt.User.ShouldBe("system");
// Historian feed prep: the Part-9 subtype rides along (Plan's AlarmType "AlarmCondition"
// parses to AlarmKind.AlarmCondition); an engine-driven Activated transition has no comment.
evt.AlarmTypeName.ShouldBe("AlarmCondition");
evt.Comment.ShouldBeNull();
}
/// <summary>Clear path: after activating, pushing a value below the threshold drives Active→Inactive
@@ -306,6 +310,9 @@ public sealed class ScriptedAlarmHostActorTests : RuntimeActorTestBase
var evt = alerts.FishForMessage<AlarmTransitionEvent>(e => e.TransitionKind == "Acknowledged", Timeout);
evt.AlarmId.ShouldBe("alm-1");
evt.User.ShouldBe("alice");
// Historian feed prep: the operator's ack comment threads through to the transition event.
evt.Comment.ShouldBe("ack-note");
evt.AlarmTypeName.ShouldBe("AlarmCondition");
}
/// <summary>Ownership filter: an AlarmCommand for an AlarmId this host's engine does NOT own is ignored