docs(xml): fill missing XML doc comments + strip task-tracking refs across src (fixdocs)

Add missing <summary>/<param>/<returns>/<typeparam> tags and switch
interface implementations to <inheritdoc/> across 106 files; strip
project bookkeeping identifiers (Task NN, #05-TNN, PLAN-04, StoreAndForward-0NN)
from shipped code comments while preserving the descriptive rationale.
Comment-only: zero code-logic lines changed; solution builds 0/0.

Claude-Session: https://claude.ai/code/session_01MtdgwpEeCUn6cUA5f1LMPj
This commit is contained in:
Joseph Doherty
2026-07-10 08:23:56 -04:00
parent 75007b9edd
commit 5a878b78d4
106 changed files with 580 additions and 180 deletions
@@ -83,6 +83,7 @@ public class AkkaHostedService : IHostedService
/// <param name="clusterOptions">The cluster configuration options.</param>
/// <param name="communicationOptions">The communication configuration options.</param>
/// <param name="logger">The logger instance.</param>
/// <param name="appLifetime">The host application lifetime; optional so existing construction sites (tests, DI variants) keep working without it.</param>
public AkkaHostedService(
IServiceProvider serviceProvider,
IOptions<NodeOptions> nodeOptions,
@@ -205,7 +206,7 @@ public class AkkaHostedService : IHostedService
// process must exit so the service supervisor (docker
// `restart: unless-stopped` / Windows service recovery) restarts it and
// it rejoins as a fresh incarnation. Without this the node idles forever
// with a dead actor system (review 01 underdeveloped #2).
// with a dead actor system (review 01 underdeveloped finding).
system.WhenTerminated.ContinueWith(_ =>
{
if (_stopRequested) return;
@@ -862,7 +863,7 @@ akka {{
// Standby must be passive: only the active site node runs the S&F
// delivery sweep. Without this gate BOTH nodes deliver the same
// replicated Pending rows — systematic duplicate external calls and
// DB writes (arch review 02, Stability #2). Re-evaluated per sweep
// DB writes (arch review 02, Stability). Re-evaluated per sweep
// tick so failover resumes delivery within one RetryTimerInterval.
// IClusterNodeProvider.SelfIsPrimary is the canonical "this node is the
// oldest Up member (singleton host)" check from the cluster-infrastructure
@@ -17,6 +17,17 @@ internal static class CentralSingletonRegistrar
{
internal sealed record Handle(IActorRef Manager, IActorRef Proxy);
/// <summary>
/// Creates the <see cref="ClusterSingletonManager"/> and proxy for a central
/// cluster singleton under the canonical naming scheme, and registers a
/// PhaseClusterLeave drain task that GracefulStops the manager on shutdown.
/// </summary>
/// <param name="system">The actor system to register the singleton on.</param>
/// <param name="name">The singleton's base name (actors are named <c>{name}-singleton</c> / <c>{name}-proxy</c>).</param>
/// <param name="singletonProps">The <see cref="Props"/> used to create the singleton's managed actor.</param>
/// <param name="logger">Logger used to report drain progress/failures.</param>
/// <param name="drainTimeout">Maximum time to wait for the drain task to complete; defaults to 10 seconds.</param>
/// <returns>A <see cref="Handle"/> carrying the singleton manager and proxy actor refs.</returns>
internal static Handle Start(
ActorSystem system,
string name,
@@ -14,6 +14,9 @@ namespace ZB.MOM.WW.ScadaBridge.Host.Health;
public static class ClusterActivityEvaluator
{
/// <summary>True when self is Up and no other Up member (in the role scope) is older.</summary>
/// <param name="cluster">The Akka cluster to evaluate.</param>
/// <param name="role">Optional role scope; when set, only members with this role are considered.</param>
/// <returns><c>true</c> when self is Up and the oldest Up member in the role scope.</returns>
public static bool SelfIsOldest(Cluster cluster, string? role = null)
{
var self = cluster.SelfMember;
@@ -29,6 +32,9 @@ public static class ClusterActivityEvaluator
}
/// <summary>The oldest Up member in the role scope, or null while none is Up. Used for Primary/Standby labelling.</summary>
/// <param name="cluster">The Akka cluster to evaluate.</param>
/// <param name="role">Optional role scope; when set, only members with this role are considered.</param>
/// <returns>The oldest Up member in the role scope, or null when none is Up.</returns>
public static Member? OldestUpMember(Cluster cluster, string? role = null)
{
Member? oldest = null;
@@ -20,7 +20,10 @@ public sealed class OldestNodeActiveHealthCheck : IHealthCheck
/// <param name="system">The live cluster actor system.</param>
public OldestNodeActiveHealthCheck(ActorSystem system) => _system = system;
/// <inheritdoc />
/// <summary>Reports Healthy only when this node is the oldest Up cluster member (the singleton host); otherwise reports Unhealthy.</summary>
/// <param name="context">The health check context (unused; the result depends only on cluster membership).</param>
/// <param name="ct">Cancellation token.</param>
/// <returns>A task that resolves to the health check result.</returns>
public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken ct = default)
{
var cluster = Akka.Cluster.Cluster.Get(_system);
@@ -94,7 +94,10 @@ public sealed class RequiredSingletonsHealthCheck : IHealthCheck
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
}
/// <inheritdoc />
/// <summary>Evaluates whether all required cluster singletons are running and reports the aggregate health.</summary>
/// <param name="context">The health-check context supplied by the health-check middleware.</param>
/// <param name="cancellationToken">Token used to cancel the health evaluation.</param>
/// <returns>A task that resolves to a healthy result when every required singleton is present, otherwise an unhealthy result describing what is missing.</returns>
public async Task<HealthCheckResult> CheckHealthAsync(
HealthCheckContext context,
CancellationToken cancellationToken = default)
+4 -4
View File
@@ -55,7 +55,7 @@ var siteId = configuration["ScadaBridge:Node:SiteId"] ?? "central";
// Console and file sinks are defined in the `Serilog` configuration
// section (appsettings.json) and applied via ReadFrom.Configuration inside the
// factory — the sink set, output template, file path and rolling interval are all
// configuration-driven per REQ-HOST-8, not hard-coded here.
// configuration-driven, not hard-coded here.
Log.Logger = ZB.MOM.WW.ScadaBridge.Host.LoggerConfigurationFactory
.Build(configuration, nodeRole, siteId, nodeHostname)
.CreateLogger();
@@ -92,7 +92,7 @@ try
// TransportOptions from ScadaBridge:Transport via BindConfiguration; no
// explicit Configure needed.
builder.Services.AddTransport();
// Script-artifact invalidation bus (#05-T14): in-process, per-node pub/sub
// Script-artifact invalidation bus: in-process, per-node pub/sub
// for ScriptArtifactsChanged. The Transport bundle importer publishes
// post-commit; the Inbound API compiled-handler cache subscribes as the
// consumer (wired in plan 06). Central-only — it lives beside the importer.
@@ -411,7 +411,7 @@ try
var methods = await apiRepo.GetAllApiMethodsAsync();
// Parallel: CompileAndRegister is safe for concurrent callers (ConcurrentDictionary
// caches, no shared mutable compile state); serial Roslyn compiles stretch the
// failover-recovery window at hundreds of methods (arch-review PLAN-06 Task 7).
// failover-recovery window at hundreds of methods.
Parallel.ForEach(methods, method => executor.CompileAndRegister(method));
}
@@ -477,7 +477,7 @@ try
// Map gRPC service — resolves the singleton SiteStreamGrpcServer from DI
app.MapGrpcService<ZB.MOM.WW.ScadaBridge.Communication.Grpc.SiteStreamGrpcServer>();
// REQ-HOST-7: site-shutdown ordering. ApplicationStopping
// Site-shutdown ordering. ApplicationStopping
// fires BEFORE IHostedService.StopAsync runs, so the gRPC server
// refuses new streams (Unavailable) and cancels every active stream
// here — clients observe a clean Cancelled and reconnect — and only
@@ -93,12 +93,16 @@ public sealed class InProcessScriptArtifactChangeBus : IScriptArtifactChangeBus
private readonly InProcessScriptArtifactChangeBus _bus;
private Action<ScriptArtifactsChanged>? _handler;
/// <summary>Initializes a new instance of the <see cref="Subscription"/> class.</summary>
/// <param name="bus">The bus this subscription is registered with.</param>
/// <param name="handler">The handler to remove from the bus on <see cref="Dispose"/>.</param>
public Subscription(InProcessScriptArtifactChangeBus bus, Action<ScriptArtifactsChanged> handler)
{
_bus = bus;
_handler = handler;
}
/// <summary>Unsubscribes the handler from the bus. Idempotent — only the first call has an effect.</summary>
public void Dispose()
{
// Idempotent: only the first Dispose removes the handler.