docs(comments): strip internal task/milestone/bundle bookkeeping from code comments
Remove project bookkeeping citations from shipped code comments across the solution: hyphenated task IDs (WP-14, StoreAndForward-025), milestone/task/ issue refs (M3, Task 4, Audit Log #23, #21), Bundle X task-bundle labels, and C/D/K/S/T phase labels. Comment text only — no code logic, string/log literals, or XML-doc structure changed. Genuine descriptions are preserved (only the citation is stripped), and technical lookalikes are retained (UTF-8, SHA-256, T00:00:00, M365, UTC-5, pre-C4/pre-C5 schema versions). Flagged by the new CommentChecker TaskReferenceInComment / TrackingReferenceInComment checks plus targeted grep passes; full solution builds clean, append-only guard tests pass.
This commit is contained in:
@@ -14,7 +14,7 @@ using System.Text.Json;
|
||||
namespace ZB.MOM.WW.ScadaBridge.SiteRuntime.Actors;
|
||||
|
||||
/// <summary>
|
||||
/// WP-16: Alarm Actor — coordinator actor, child of Instance Actor, peer to Script Actors.
|
||||
/// Alarm Actor — coordinator actor, child of Instance Actor, peer to Script Actors.
|
||||
/// Subscribes to attribute change notifications from Instance Actor.
|
||||
///
|
||||
/// Evaluates alarm conditions:
|
||||
@@ -25,7 +25,7 @@ namespace ZB.MOM.WW.ScadaBridge.SiteRuntime.Actors;
|
||||
/// State (active/normal) is in memory only, NOT persisted.
|
||||
/// On restart: starts normal, re-evaluates from incoming values.
|
||||
///
|
||||
/// WP-21: AlarmExecutionActor CAN call Instance.CallScript() (ask to sibling Script Actor).
|
||||
/// AlarmExecutionActor CAN call Instance.CallScript() (ask to sibling Script Actor).
|
||||
/// Instance scripts CANNOT call alarm on-trigger scripts (no Instance.CallAlarmScript API).
|
||||
///
|
||||
/// Supervision: Resume on exception; AlarmExecutionActor stopped on exception.
|
||||
@@ -42,7 +42,7 @@ public class AlarmActor : ReceiveActor
|
||||
private readonly IServiceProvider? _serviceProvider;
|
||||
|
||||
/// <summary>
|
||||
/// M1.5: the optional site operational-event log, resolved once from
|
||||
/// The optional site operational-event log, resolved once from
|
||||
/// <see cref="_serviceProvider"/> at construction and cached. The
|
||||
/// registration is process-lifetime (a singleton), so resolving once on
|
||||
/// the actor's own thread is both correct and cheaper than a per-event
|
||||
@@ -53,7 +53,7 @@ public class AlarmActor : ReceiveActor
|
||||
private readonly ISiteEventLogger? _siteEventLogger;
|
||||
|
||||
/// <summary>
|
||||
/// M1.5: priority at or above which a computed-alarm raise is logged as
|
||||
/// Priority at or above which a computed-alarm raise is logged as
|
||||
/// <c>Error</c> to the site event log; below it, raises log as <c>Warning</c>.
|
||||
/// Mirrors the 0–1000 alarm-severity scale.
|
||||
/// </summary>
|
||||
@@ -73,7 +73,7 @@ public class AlarmActor : ReceiveActor
|
||||
private readonly Script<object?>? _onTriggerCompiledScript;
|
||||
|
||||
/// <summary>
|
||||
/// M2.5 (#9): the on-trigger script's per-script execution timeout in seconds,
|
||||
/// The on-trigger script's per-script execution timeout in seconds,
|
||||
/// or null to use the global default. Forwarded to each spawned
|
||||
/// <see cref="AlarmExecutionActor"/>, which applies <c>perScript ?? global</c>
|
||||
/// (treating ≤ 0 as "use global"). The value comes from the referenced
|
||||
@@ -88,7 +88,7 @@ public class AlarmActor : ReceiveActor
|
||||
private readonly Dictionary<string, object?> _attributeSnapshot = new();
|
||||
|
||||
/// <summary>
|
||||
/// SiteRuntime-017: the exact dictionary instance this actor was seeded from
|
||||
/// The exact dictionary instance this actor was seeded from
|
||||
/// at construction. The Instance Actor must pass a private snapshot here, not
|
||||
/// its live <c>_attributes</c> field. Exposed for regression coverage of that
|
||||
/// isolation contract.
|
||||
@@ -114,9 +114,9 @@ public class AlarmActor : ReceiveActor
|
||||
/// <param name="initialAttributes">Seed attribute snapshot so static attributes evaluate correctly at startup.</param>
|
||||
/// <param name="healthCollector">Optional health collector for surfacing alarm execution metrics.</param>
|
||||
/// <param name="serviceProvider">Optional DI service provider used to resolve the optional
|
||||
/// <see cref="ISiteEventLogger"/> for M1.5 <c>alarm</c> operational events. Fire-and-forget;
|
||||
/// <see cref="ISiteEventLogger"/> for <c>alarm</c> operational events. Fire-and-forget;
|
||||
/// a logging failure never affects alarm evaluation.</param>
|
||||
/// <param name="onTriggerExecutionTimeoutSeconds">M2.5 (#9): the on-trigger script's per-script
|
||||
/// <param name="onTriggerExecutionTimeoutSeconds">The on-trigger script's per-script
|
||||
/// execution timeout in seconds (from its <see cref="ResolvedScript.ExecutionTimeoutSeconds"/>),
|
||||
/// or null/non-positive to use the global default.</param>
|
||||
public AlarmActor(
|
||||
@@ -132,7 +132,7 @@ public class AlarmActor : ReceiveActor
|
||||
IReadOnlyDictionary<string, object?>? initialAttributes = null,
|
||||
ISiteHealthCollector? healthCollector = null,
|
||||
IServiceProvider? serviceProvider = null,
|
||||
// M2.5 (#9): per-script timeout for the on-trigger script (null = global).
|
||||
// Per-script timeout for the on-trigger script (null = global).
|
||||
int? onTriggerExecutionTimeoutSeconds = null)
|
||||
{
|
||||
_alarmName = alarmName;
|
||||
@@ -143,7 +143,7 @@ public class AlarmActor : ReceiveActor
|
||||
_logger = logger;
|
||||
_healthCollector = healthCollector;
|
||||
_serviceProvider = serviceProvider;
|
||||
// M1.5: resolve the optional site event logger once and cache it,
|
||||
// Resolve the optional site event logger once and cache it,
|
||||
// rather than calling GetService on every alarm transition.
|
||||
_siteEventLogger = serviceProvider?.GetService<ISiteEventLogger>();
|
||||
_priority = alarmConfig.PriorityLevel;
|
||||
@@ -252,7 +252,7 @@ public class AlarmActor : ReceiveActor
|
||||
_instanceName, _alarmName, AlarmState.Active, _priority, DateTimeOffset.UtcNow);
|
||||
_instanceActor.Tell(alarmChanged);
|
||||
|
||||
// M1.5: operational `alarm` event — raise. Severity by priority.
|
||||
// Operational `alarm` event — raise. Severity by priority.
|
||||
LogAlarmEvent(RaiseSeverity(_priority), $"Alarm {_alarmName} activated (priority {_priority})");
|
||||
|
||||
// Spawn AlarmExecutionActor if on-trigger script defined
|
||||
@@ -273,7 +273,7 @@ public class AlarmActor : ReceiveActor
|
||||
_instanceName, _alarmName, AlarmState.Normal, _priority, DateTimeOffset.UtcNow);
|
||||
_instanceActor.Tell(alarmChanged);
|
||||
|
||||
// M1.5: operational `alarm` event — return to normal.
|
||||
// Operational `alarm` event — return to normal.
|
||||
LogAlarmEvent("Info", $"Alarm {_alarmName} cleared");
|
||||
}
|
||||
}
|
||||
@@ -315,7 +315,7 @@ public class AlarmActor : ReceiveActor
|
||||
};
|
||||
_instanceActor.Tell(alarmChanged);
|
||||
|
||||
// M1.5: operational `alarm` event. Entering a band from Normal is a raise
|
||||
// Operational `alarm` event. Entering a band from Normal is a raise
|
||||
// (severity by the band's priority); returning to None is a clear; a
|
||||
// level-to-level escalation/de-escalation is an informational transition.
|
||||
if (newLevel == AlarmLevel.None)
|
||||
@@ -342,7 +342,7 @@ public class AlarmActor : ReceiveActor
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// M1.5: maps an alarm priority (0–1000) to a site-event severity for a
|
||||
/// Maps an alarm priority (0–1000) to a site-event severity for a
|
||||
/// <i>raise</i> transition — <c>Error</c> at or above
|
||||
/// <see cref="ErrorPriorityThreshold"/>, otherwise <c>Warning</c>. Clears and
|
||||
/// inter-band transitions always log as <c>Info</c>.
|
||||
@@ -351,7 +351,7 @@ public class AlarmActor : ReceiveActor
|
||||
priority >= ErrorPriorityThreshold ? "Error" : "Warning";
|
||||
|
||||
/// <summary>
|
||||
/// M1.5: fire-and-forget an <c>alarm</c> operational event to the optional
|
||||
/// Fire-and-forget an <c>alarm</c> operational event to the optional
|
||||
/// <see cref="ISiteEventLogger"/> (resolved once at construction and cached
|
||||
/// in <see cref="_siteEventLogger"/>). Never awaited so a logging failure
|
||||
/// cannot affect alarm evaluation (matching the established
|
||||
@@ -429,7 +429,7 @@ public class AlarmActor : ReceiveActor
|
||||
try
|
||||
{
|
||||
// InvariantCulture so string attribute values parse consistently
|
||||
// regardless of host locale (SiteRuntime-023).
|
||||
// regardless of host locale.
|
||||
var numericValue = Convert.ToDouble(value, CultureInfo.InvariantCulture);
|
||||
return numericValue < config.Min || numericValue > config.Max;
|
||||
}
|
||||
@@ -447,7 +447,7 @@ public class AlarmActor : ReceiveActor
|
||||
try
|
||||
{
|
||||
// InvariantCulture so string attribute values parse consistently
|
||||
// regardless of host locale (SiteRuntime-023).
|
||||
// regardless of host locale.
|
||||
var numericValue = Convert.ToDouble(value, CultureInfo.InvariantCulture);
|
||||
|
||||
// Add to window
|
||||
@@ -537,7 +537,7 @@ public class AlarmActor : ReceiveActor
|
||||
|
||||
double numericValue;
|
||||
// InvariantCulture so string attribute values parse consistently
|
||||
// regardless of host locale (SiteRuntime-023).
|
||||
// regardless of host locale.
|
||||
try { numericValue = Convert.ToDouble(value, CultureInfo.InvariantCulture); }
|
||||
catch { return _currentLevel; }
|
||||
|
||||
@@ -575,7 +575,7 @@ public class AlarmActor : ReceiveActor
|
||||
/// <param name="priority">The firing alarm priority.</param>
|
||||
/// <param name="message">The firing alarm message.</param>
|
||||
/// <param name="parentExecutionId">
|
||||
/// Audit Log #23 (M5.4 — ParentExecutionId tag-cascade): the execution id of
|
||||
/// The execution id of
|
||||
/// the context that fired this alarm, recorded as the on-trigger script run's
|
||||
/// <c>ParentExecutionId</c> so the alarm-triggered run chains under its firing
|
||||
/// context in the audit tree. The alarm subsystem currently has no Guid-typed
|
||||
@@ -590,7 +590,7 @@ public class AlarmActor : ReceiveActor
|
||||
|
||||
var executionId = $"{_alarmName}-alarm-exec-{_executionCounter++}";
|
||||
|
||||
// SiteRuntime-009: the on-trigger script body runs on the dedicated
|
||||
// The on-trigger script body runs on the dedicated
|
||||
// ScriptExecutionScheduler, not the shared .NET thread pool.
|
||||
var props = Props.Create(() => new AlarmExecutionActor(
|
||||
_alarmName,
|
||||
@@ -603,9 +603,9 @@ public class AlarmActor : ReceiveActor
|
||||
_sharedScriptLibrary,
|
||||
_options,
|
||||
_logger,
|
||||
// M2.5 (#9): per-script timeout from the on-trigger script (null = global).
|
||||
// Per-script timeout from the on-trigger script (null = global).
|
||||
_onTriggerExecutionTimeoutSeconds,
|
||||
// Audit Log #23 (M5.4): the firing context's execution id (null today).
|
||||
// The firing context's execution id (null today).
|
||||
parentExecutionId));
|
||||
|
||||
Context.ActorOf(props, executionId);
|
||||
|
||||
Reference in New Issue
Block a user