fix(communication): drop IsConfiguredPlaceholder rows in StreamRelayActor before gRPC pack
Placeholder AlarmStateChanged rows are a DebugView snapshot-only concept emitted by InstanceActor.BuildAlarmStatesSnapshot; they are never a real alarm transition. Their timestamp may be DateTimeOffset.MinValue (the Protobuf Timestamp lower boundary), which can throw when packed via Timestamp.FromDateTimeOffset. Added early-return guard at the top of HandleAlarmStateChanged before any timestamp pack or channel write. Updated the existing NativeBindingLinkage round-trip test to use a real (non-placeholder) native alarm; added DropsAlarmStateChanged_WhenIsConfiguredPlaceholder to assert placeholders are silently dropped (15/15 pass).
This commit is contained in:
@@ -56,6 +56,15 @@ public class StreamRelayActor : ReceiveActor
|
||||
|
||||
private void HandleAlarmStateChanged(AlarmStateChanged msg)
|
||||
{
|
||||
// Placeholder rows (IsConfiguredPlaceholder) are a Debug View snapshot-only
|
||||
// concept emitted by InstanceActor.BuildAlarmStatesSnapshot — they are never a
|
||||
// real alarm transition and must not be relayed to the live gRPC stream (their
|
||||
// timestamp may be DateTimeOffset.MinValue, the Protobuf Timestamp boundary).
|
||||
if (msg.IsConfiguredPlaceholder)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var protoEvent = new SiteStreamEvent
|
||||
{
|
||||
CorrelationId = _correlationId,
|
||||
|
||||
Reference in New Issue
Block a user