docs(src): fix CommentChecker findings across src/ — 1,032 → 5 (all false positives)

Comment/XML-doc changes only, no code logic:
- strip project-tracking references (WP*, P*-*, row-NN, #NN, Task N) from
  comments, keeping the explanatory rationale
- add missing summaries, <param>, <returns>, <typeparam> and <inheritdoc/>
- replace misused <inheritdoc/> with real docs; where <inheritdoc/> was
  combined with useful remarks, move the rationale into // comments
- drop stale replicationActor <param> on DeploymentManagerActor ctor

Remaining 5 are false positives (CWE-1236 x2, failures-1, year-0001, M365).
Build 0 errors / 0 warnings.
This commit is contained in:
Joseph Doherty
2026-10-07 14:12:25 -04:00
parent 3a217b9484
commit 0ffd4bdbea
217 changed files with 1224 additions and 695 deletions
@@ -14,7 +14,7 @@ namespace ZB.MOM.WW.ScadaBridge.Communication;
/// <summary>
/// Default <see cref="ISiteAlarmLiveCache"/> — the DI singleton that owns the shared,
/// reference-counted, transient per-site live alarm cache (plan #10, Task 4). For each
/// reference-counted, transient per-site live alarm cache. For each
/// site with active Alarm Summary viewers it runs ONE
/// <see cref="SiteAlarmAggregatorActor"/>, seeded by the existing debug-snapshot fan-out
/// (<see cref="CommunicationService.RequestDebugSnapshotAsync"/>) and kept warm on a
@@ -246,7 +246,7 @@ public sealed class SiteAlarmLiveCacheService : ISiteAlarmLiveCache
TimeSpan.FromSeconds(5), // reconnect delay — former ReconnectDelay static default
TimeSpan.FromSeconds(60), // stability window — former StabilityWindow static default
_options.LiveAlarmCacheReconcileJitterFraction,
// Open-attempt deadline (P3-4). Passed explicitly rather than defaulted:
// Open-attempt deadline. Passed explicitly rather than defaulted:
// Props.Create takes an expression tree, which may not omit an optional
// argument (CS0854).
SiteAlarmAggregatorActor.DefaultOpenAttemptTimeout));
@@ -426,9 +426,9 @@ public sealed class SiteAlarmLiveCacheService : ISiteAlarmLiveCache
await gate.WaitAsync(ct);
try
{
// Alarms-only (WP2.3): this fan-out discards snapshot.AttributeValues, so
// Alarms-only: this fan-out discards snapshot.AttributeValues, so
// asking the site to build and ship them is pure wire waste. The flag is
// additive on the wire; a pre-WP2.3 site ignores it and returns the full
// additive on the wire; an older site ignores it and returns the full
// snapshot, which this loop reads exactly as before.
var request = new DebugSnapshotRequest(
instanceUniqueName, Guid.NewGuid().ToString("N"), AlarmsOnly: true);
@@ -470,7 +470,7 @@ public sealed class SiteAlarmLiveCacheService : ISiteAlarmLiveCache
entry.HasPublished = true;
// Liveness is the STREAM's, not the cache's: a completed or given-up stream must
// stop reporting live between reopen ticks, or the page grafts a freezing snapshot
// over fresh poll data (WP2.3 carried residual).
// over fresh poll data.
entry.StreamLive = streamLive;
subscribers = entry.Subscribers.ToArray();
}
@@ -496,6 +496,9 @@ public sealed class SiteAlarmLiveCacheService : ISiteAlarmLiveCache
/// <summary>Watches one aggregator and fires a callback exactly once on Terminated.</summary>
private sealed class AggregatorTerminationWatcher : ReceiveActor
{
/// <summary>Creates the watcher and begins watching the aggregator.</summary>
/// <param name="watched">The aggregator actor to watch.</param>
/// <param name="onTerminated">Callback invoked once when the watched actor terminates.</param>
public AggregatorTerminationWatcher(IActorRef watched, Action onTerminated)
{
Context.Watch(watched);
@@ -551,11 +554,20 @@ public sealed class SiteAlarmLiveCacheService : ISiteAlarmLiveCache
/// <summary>Per-site bookkeeping. All mutable fields are guarded by the service's <c>_lock</c>.</summary>
private sealed class SiteEntry
{
/// <summary>Creates the bookkeeping entry for a site.</summary>
/// <param name="siteId">The numeric site id.</param>
public SiteEntry(int siteId) => SiteId = siteId;
/// <summary>The numeric site id this entry tracks.</summary>
public int SiteId { get; }
/// <summary>Active viewer subscriptions for the site.</summary>
public List<Subscription> Subscribers { get; } = new();
/// <summary>The site's shared aggregator actor, or <c>null</c> when none is running.</summary>
public IActorRef? Actor { get; set; }
/// <summary>True while an aggregator start attempt is in progress.</summary>
public bool Starting { get; set; }
/// <summary>Current published snapshot the page renders. Swapped as a whole immutable list.</summary>
@@ -578,7 +590,10 @@ public sealed class SiteAlarmLiveCacheService : ISiteAlarmLiveCache
/// </summary>
public bool StreamLive { get; set; }
/// <summary>Timer that stops the aggregator after the last viewer leaves.</summary>
public Timer? LingerTimer { get; set; }
/// <summary>Version counter that invalidates a stale linger-timer callback.</summary>
public int LingerVersion { get; set; }
/// <summary>Bounded retry timer armed when a start attempt failed to create the actor.</summary>
@@ -611,6 +626,7 @@ public sealed class SiteAlarmLiveCacheService : ISiteAlarmLiveCache
{
public static readonly NoOpSubscription Instance = new();
private NoOpSubscription() { }
/// <summary>Does nothing; the rejected subscription was never registered.</summary>
public void Dispose() { }
}
@@ -620,6 +636,10 @@ public sealed class SiteAlarmLiveCacheService : ISiteAlarmLiveCache
private readonly SiteAlarmLiveCacheService _owner;
private int _disposed;
/// <summary>Creates a subscription handle for a viewer.</summary>
/// <param name="owner">The owning cache service.</param>
/// <param name="siteId">The numeric site id subscribed to.</param>
/// <param name="onChanged">Callback invoked when the site's cache changes.</param>
public Subscription(SiteAlarmLiveCacheService owner, int siteId, Action onChanged)
{
_owner = owner;
@@ -627,9 +647,13 @@ public sealed class SiteAlarmLiveCacheService : ISiteAlarmLiveCache
OnChanged = onChanged;
}
/// <summary>The numeric site id subscribed to.</summary>
public int SiteId { get; }
/// <summary>Callback invoked when the site's cache changes.</summary>
public Action OnChanged { get; }
/// <summary>Unregisters this viewer from the owning cache; safe to call more than once.</summary>
public void Dispose()
{
if (Interlocked.Exchange(ref _disposed, 1) == 0)