docs: fill missing XML docs and strip tracking IDs from src comments

Clears CommentChecker findings in src/ (3,280 -> 209, the remainder being false
positives like PLC-5/IEEE-754/M0.0) by adding missing summaries/params/returns,
normalising inheritdoc usage, and removing Gitea/review tracking IDs while keeping
the rationale they annotated. Comment-only: comment-stripped sources are identical
to the parent commit.
This commit is contained in:
Joseph Doherty
2026-10-15 06:14:58 -04:00
parent ebcbd81fca
commit 826312befe
430 changed files with 4434 additions and 3923 deletions
@@ -58,7 +58,7 @@ public sealed class ConfigPublishCoordinator : ReceiveActor, IWithTimers
public const string DeploymentsTopic = "deployments";
public const string DeploymentAcksTopic = "deployment-acks";
/// <summary>Central's apply deadline — the shared <see cref="DeployTimings.ApplyDeadline"/>, which the node's
/// apply-outcome timeout is derived from (Gitea #601).</summary>
/// apply-outcome timeout is derived from.</summary>
public static readonly TimeSpan DefaultApplyDeadline = DeployTimings.ApplyDeadline;
private readonly IDbContextFactory<OtOpcUaConfigDbContext> _dbFactory;
@@ -69,9 +69,9 @@ public sealed class ConfigPublishCoordinator : ReceiveActor, IWithTimers
/// <see langword="null"/> to publish on the mediator directly.
/// </summary>
/// <remarks>
/// Null in tests and on any node wired before Phase 2, where the fallback reproduces the
/// pre-Phase-2 behaviour exactly. The DistributedPubSub branch behind it is <b>retained</b>,
/// not scheduled for deletion — an earlier note here promised Phase 6 would remove it, which
/// Null in tests and on any node wired without a mesh router, where the fallback reproduces the
/// original behaviour exactly. The DistributedPubSub branch behind it is <b>retained</b>,
/// not scheduled for deletion — an earlier note here promised it would be removed, which
/// was deliberately reversed (<c>docs/Configuration.md</c> § "The compiled transport-mode
/// defaults were deliberately NOT flipped"): DPS is still the correct and default transport
/// for a single-mesh topology; gRPC is what crosses a mesh boundary.
@@ -85,12 +85,12 @@ public sealed class ConfigPublishCoordinator : ReceiveActor, IWithTimers
private static readonly IEqualityComparer<NodeId> NodeIdComparer = new CaseInsensitiveNodeIdComparer();
private readonly Dictionary<NodeId, ApplyAckOutcome> _acks = new(NodeIdComparer);
/// <summary>Gitea #601 — the expected nodes whose Applied ack was DEGRADED (address-space apply partial).
/// <summary>The expected nodes whose Applied ack was DEGRADED (address-space apply partial).
/// Recovered from the DB on failover via <see cref="IsDegraded"/>.</summary>
private readonly HashSet<NodeId> _degraded = new(NodeIdComparer);
/// <summary>
/// Gitea #601 — prefix of <c>NodeDeploymentState.FailureReason</c> on an <b>Applied</b> row whose apply
/// Prefix of <c>NodeDeploymentState.FailureReason</c> on an <b>Applied</b> row whose apply
/// was degraded. The status model is deliberately unchanged (no new enum value, no migration): a
/// degraded node DID apply the revision, so its status stays <see cref="NodeDeploymentStatus.Applied"/>
/// and the degradation rides the existing reason column, which <c>/fleet</c> already renders.
@@ -98,7 +98,7 @@ public sealed class ConfigPublishCoordinator : ReceiveActor, IWithTimers
public const string DegradedReasonPrefix = ApplyAck.DegradedReasonPrefix;
/// <summary>
/// Gitea #601 — whether a <c>NodeDeploymentState</c> row records a degraded apply: status
/// Whether a <c>NodeDeploymentState</c> row records a degraded apply: status
/// <see cref="NodeDeploymentStatus.Applied"/> with a non-empty <c>FailureReason</c>. A clean Applied row
/// never carries a reason (neither this coordinator nor <c>DriverHostActor</c> writes one), so an
/// old node's row reads as clean exactly as before.
@@ -121,7 +121,7 @@ public sealed class ConfigPublishCoordinator : ReceiveActor, IWithTimers
/// <returns>The Akka.NET <see cref="Akka.Actor.Props"/> used to spawn this actor.</returns>
/// <param name="meshRouter">
/// Central comm actor the dispatch is handed to, or <see langword="null"/> to publish on the
/// DistributedPubSub mediator directly (the pre-Phase-2 behaviour).
/// DistributedPubSub mediator directly (the original behaviour).
/// </param>
public static Props Props(
IDbContextFactory<OtOpcUaConfigDbContext> dbFactory,
@@ -267,7 +267,7 @@ public sealed class ConfigPublishCoordinator : ReceiveActor, IWithTimers
}
_acks[msg.NodeId] = msg.Outcome;
// #601 — an old node never sets Degraded, so its ack takes the clean branch exactly as before.
// An old node never sets Degraded, so its ack takes the clean branch exactly as before.
if (IsDegradedAck(msg)) _degraded.Add(msg.NodeId);
else _degraded.Remove(msg.NodeId);
PersistNodeAck(msg);
@@ -291,7 +291,7 @@ public sealed class ConfigPublishCoordinator : ReceiveActor, IWithTimers
? NodeDeploymentStatus.Applied
: NodeDeploymentStatus.Failed;
row.AppliedAtUtc = DateTime.UtcNow;
// #601 — an Applied+degraded ack keeps status Applied and records WHY in the reason column, so the row
// An Applied+degraded ack keeps status Applied and records WHY in the reason column, so the row
// reads as degraded (IsDegraded) rather than clean. A clean or Failed ack writes what it always did.
row.FailureReason = IsDegradedAck(msg)
? Truncate(DegradedReasonPrefix + (string.IsNullOrWhiteSpace(msg.DegradedReason)
@@ -317,7 +317,7 @@ public sealed class ConfigPublishCoordinator : ReceiveActor, IWithTimers
UpdateDeploymentStatus(db, _current.Value, DeploymentStatus.Sealed, sealNow: true);
if (_degraded.Count > 0)
{
// #601 — still Sealed: every node DID apply this revision and is running it, and "latest sealed" is
// Still Sealed: every node DID apply this revision and is running it, and "latest sealed" is
// what drift detection and the publish actor's fallback key on, so a degraded deploy that was not
// sealed would make the fleet look one revision behind what it actually runs. Sealed is not the
// same as clean, though: the deployment's reason names the degraded nodes (per-node detail is on
@@ -432,11 +432,16 @@ public sealed class ConfigPublishCoordinator : ReceiveActor, IWithTimers
/// expected-ack set and incoming acks agree regardless of host-name casing.</summary>
private sealed class CaseInsensitiveNodeIdComparer : IEqualityComparer<NodeId>
{
/// <inheritdoc />
/// <summary>Compares two node ids by value, ignoring case.</summary>
/// <param name="x">The first node id.</param>
/// <param name="y">The second node id.</param>
/// <returns><see langword="true"/> when the ids are equal ignoring case.</returns>
public bool Equals(NodeId x, NodeId y) =>
string.Equals(x.Value, y.Value, StringComparison.OrdinalIgnoreCase);
/// <inheritdoc />
/// <summary>Gets a case-insensitive hash code for a node id.</summary>
/// <param name="obj">The node id.</param>
/// <returns>The hash code of the id value.</returns>
public int GetHashCode(NodeId obj) =>
StringComparer.OrdinalIgnoreCase.GetHashCode(obj.Value ?? string.Empty);
}