docs: backfill XML documentation across 756 files
v2-ci / build (push) Failing after 1m43s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped

Adds <summary>, <param>, <typeparam>, and <inheritdoc/> tags to public
members surfaced by commentchecker — resolves 5,847 of 5,869 issues
(99.6%) across three /fixdocs passes.
This commit is contained in:
Joseph Doherty
2026-05-28 08:10:17 -04:00
parent f9fc7dd2e1
commit 64e3fbe035
756 changed files with 9876 additions and 96 deletions
@@ -21,11 +21,18 @@ public sealed class AdminOperationsActor : ReceiveActor
private readonly IActorRef _coordinator;
private readonly ILoggingAdapter _log = Context.GetLogger();
/// <summary>Creates actor props for the admin operations actor.</summary>
/// <param name="dbFactory">Factory for creating config database contexts.</param>
/// <param name="coordinator">Reference to the deployment coordinator actor.</param>
/// <returns>Props configured to create an AdminOperationsActor.</returns>
public static Props Props(
IDbContextFactory<OtOpcUaConfigDbContext> dbFactory,
IActorRef coordinator) =>
Akka.Actor.Props.Create(() => new AdminOperationsActor(dbFactory, coordinator));
/// <summary>Initializes a new instance of the AdminOperationsActor.</summary>
/// <param name="dbFactory">Factory for creating config database contexts.</param>
/// <param name="coordinator">Reference to the deployment coordinator actor.</param>
public AdminOperationsActor(
IDbContextFactory<OtOpcUaConfigDbContext> dbFactory,
IActorRef coordinator)
@@ -22,6 +22,9 @@ public static class ConfigComposer
DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.Never,
};
/// <summary>Reads the current configuration and returns a deterministic snapshot blob with revision hash.</summary>
/// <param name="db">The configuration database context.</param>
/// <param name="ct">The cancellation token for the operation.</param>
public static async Task<ConfigArtifact> SnapshotAndFlattenAsync(
OtOpcUaConfigDbContext db, CancellationToken ct = default)
{
@@ -49,6 +52,7 @@ public static class ConfigComposer
}
/// <summary>Returns the SHA-256 hex digest of the supplied artifact bytes (lowercase, no prefix).</summary>
/// <param name="blob">The bytes to hash.</param>
public static string HashOf(ReadOnlySpan<byte> blob) =>
Convert.ToHexStringLower(SHA256.HashData(blob));
}
@@ -29,11 +29,16 @@ public sealed class AuditWriterActor : ReceiveActor, IWithTimers
private readonly ILoggingAdapter _log = Context.GetLogger();
private readonly Dictionary<Guid, AuditEvent> _buffer = new();
/// <summary>Gets or sets the timer scheduler for the actor.</summary>
public ITimerScheduler Timers { get; set; } = null!;
/// <summary>Creates a Props factory for the AuditWriterActor.</summary>
/// <param name="dbFactory">The database context factory for creating ConfigDb connections.</param>
public static Props Props(IDbContextFactory<OtOpcUaConfigDbContext> dbFactory) =>
Akka.Actor.Props.Create(() => new AuditWriterActor(dbFactory));
/// <summary>Initializes a new instance of the AuditWriterActor class.</summary>
/// <param name="dbFactory">The database context factory for creating ConfigDb connections.</param>
public AuditWriterActor(IDbContextFactory<OtOpcUaConfigDbContext> dbFactory)
{
_dbFactory = dbFactory;
@@ -41,6 +46,7 @@ public sealed class AuditWriterActor : ReceiveActor, IWithTimers
Receive<Flush>(_ => FlushBuffer());
}
/// <inheritdoc />
protected override void PreStart()
{
Timers.StartPeriodicTimer("flush", Flush.Instance, FlushInterval);
@@ -86,12 +92,14 @@ public sealed class AuditWriterActor : ReceiveActor, IWithTimers
}
}
/// <inheritdoc />
protected override void PreRestart(Exception reason, object message)
{
FlushBuffer();
base.PreRestart(reason, message);
}
/// <inheritdoc />
protected override void PostStop()
{
FlushBuffer();
@@ -35,13 +35,22 @@ public sealed class ConfigPublishCoordinator : ReceiveActor, IWithTimers
private DeploymentId? _current;
private HashSet<NodeId> _expectedAcks = new();
/// <summary>Gets the timer scheduler for managing apply deadlines.</summary>
public ITimerScheduler Timers { get; set; } = null!;
/// <summary>Creates actor props for the ConfigPublishCoordinator with the specified configuration.</summary>
/// <param name="dbFactory">The database context factory for accessing configuration data.</param>
/// <param name="applyDeadline">The timeout for waiting for apply acknowledgments from cluster nodes.</param>
public static Props Props(
IDbContextFactory<OtOpcUaConfigDbContext> dbFactory,
TimeSpan? applyDeadline = null) =>
Akka.Actor.Props.Create(() => new ConfigPublishCoordinator(dbFactory, applyDeadline ?? DefaultApplyDeadline));
/// <summary>
/// Initializes a new instance of the <see cref="ConfigPublishCoordinator"/> class.
/// </summary>
/// <param name="dbFactory">The database context factory for persisting deployment state.</param>
/// <param name="applyDeadline">The timeout for waiting for per-node apply acknowledgments.</param>
public ConfigPublishCoordinator(
IDbContextFactory<OtOpcUaConfigDbContext> dbFactory,
TimeSpan applyDeadline)
@@ -59,6 +68,7 @@ public sealed class ConfigPublishCoordinator : ReceiveActor, IWithTimers
/// died. We re-derive <c>_expectedAcks</c> from <c>NodeDeploymentState</c>, replay the ACKs
/// that already landed in the DB, and resume the deadline timer.
/// </summary>
/// <inheritdoc />
protected override void PreStart()
{
// Subscribe to per-node ApplyAck broadcasts so DriverHostActors on remote members can
@@ -28,6 +28,7 @@ public sealed class FleetStatusBroadcaster : ReceiveActor, IWithTimers
private readonly ILoggingAdapter _log = Context.GetLogger();
private readonly Dictionary<NodeId, NodeRecord> _nodes = new();
/// <summary>Gets or sets the timer scheduler for this actor.</summary>
public ITimerScheduler Timers { get; set; } = null!;
/// <summary>
@@ -36,9 +37,14 @@ public sealed class FleetStatusBroadcaster : ReceiveActor, IWithTimers
/// </summary>
public sealed record DriverHostStatusHeartbeat(NodeId NodeId, RevisionHash? CurrentRevision);
/// <summary>Creates actor props for the fleet status broadcaster.</summary>
/// <param name="broadcast">Optional custom broadcast delegate; defaults to distributed pub-sub mediator.</param>
/// <returns>Props configured to create a FleetStatusBroadcaster.</returns>
public static Props Props(Action<object>? broadcast = null) =>
Akka.Actor.Props.Create(() => new FleetStatusBroadcaster(broadcast));
/// <summary>Initializes a new instance of the FleetStatusBroadcaster actor.</summary>
/// <param name="broadcast">Optional custom broadcast delegate; if null, uses distributed pub-sub mediator.</param>
public FleetStatusBroadcaster(Action<object>? broadcast = null)
{
_cluster = Akka.Cluster.Cluster.Get(Context.System);
@@ -55,6 +61,7 @@ public sealed class FleetStatusBroadcaster : ReceiveActor, IWithTimers
Receive<Tick>(_ => OnTick());
}
/// <inheritdoc />
protected override void PreStart()
{
_cluster.Subscribe(
@@ -67,6 +74,7 @@ public sealed class FleetStatusBroadcaster : ReceiveActor, IWithTimers
Timers.StartPeriodicTimer("tick", Tick.Instance, BroadcastInterval);
}
/// <inheritdoc />
protected override void PostStop() => _cluster.Unsubscribe(Self);
private void OnMemberUp(Member m)
@@ -27,13 +27,20 @@ public sealed class RedundancyStateActor : ReceiveActor, IWithTimers
private readonly Action<object>? _broadcastOverride;
private bool _dirty;
/// <summary>Gets the timer scheduler for this actor.</summary>
public ITimerScheduler Timers { get; set; } = null!;
/// <summary>Creates a Props for creating a RedundancyStateActor.</summary>
/// <param name="broadcast">Optional broadcast override for testing.</param>
/// <returns>Props for actor creation.</returns>
public static Props Props(Action<object>? broadcast = null) =>
Akka.Actor.Props.Create(() => new RedundancyStateActor(broadcast));
/// <summary>Initializes a new instance of RedundancyStateActor with no broadcast override.</summary>
public RedundancyStateActor() : this(broadcast: null) { }
/// <summary>Initializes a new instance of RedundancyStateActor.</summary>
/// <param name="broadcast">Optional broadcast override for testing.</param>
public RedundancyStateActor(Action<object>? broadcast)
{
_cluster = Akka.Cluster.Cluster.Get(Context.System);
@@ -47,6 +54,7 @@ public sealed class RedundancyStateActor : ReceiveActor, IWithTimers
Receive<RecomputeNow>(_ => PublishIfDirty());
}
/// <inheritdoc />
protected override void PreStart()
{
_cluster.Subscribe(
@@ -58,6 +66,7 @@ public sealed class RedundancyStateActor : ReceiveActor, IWithTimers
typeof(ClusterEvent.ReachabilityEvent));
}
/// <inheritdoc />
protected override void PostStop() => _cluster.Unsubscribe(Self);
private void MarkDirty()
@@ -22,6 +22,9 @@ public readonly record struct NodeHealthInputs(
/// </summary>
public static class ServiceLevelCalculator
{
/// <summary>Computes the service level (0-255) based on node health inputs.</summary>
/// <param name="h">The node health inputs including cluster state, database reachability, and probe status.</param>
/// <returns>A service level byte value (0-255) indicating node authority, where higher values indicate more authoritative nodes.</returns>
public static byte Compute(NodeHealthInputs h)
{
if (h.MemberState is not (MemberStatus.Up or MemberStatus.Joining))
@@ -26,7 +26,10 @@ public static class ServiceCollectionExtensions
/// Registers all five admin-role cluster singletons + their proxies on the AkkaConfigurationBuilder.
/// Must be called against the same builder used by <c>AkkaHostedService</c> so the singletons
/// share the host's ActorSystem.
///
/// </summary>
/// <param name="builder">The Akka configuration builder.</param>
/// <returns>The builder for fluent chaining.</returns>
/// <remarks>
/// Wire from the fused Host's Program.cs:
/// <code>
/// builder.Services.AddAkka("otopcua", (ab, sp) =>
@@ -35,7 +38,7 @@ public static class ServiceCollectionExtensions
/// ab.WithOtOpcUaControlPlaneSingletons();
/// });
/// </code>
/// </summary>
/// </remarks>
public static AkkaConfigurationBuilder WithOtOpcUaControlPlaneSingletons(this AkkaConfigurationBuilder builder)
{
var singletonOptions = new ClusterSingletonOptions { Role = AdminRole };