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
@@ -154,6 +154,10 @@ public class DeploymentManagerActor : ReceiveActor, IWithTimers
/// <see cref="RefreshDeploymentCommand"/> path; null on nodes/tests that never
/// receive a refresh.
/// </param>
/// <param name="startupLoadRetryInterval">Optional retry interval used when loading
/// deployed configuration at startup; defaults to 5 seconds when null.</param>
/// <param name="configLoader">Optional override for loading all deployed configurations
/// at startup; defaults to reading from <paramref name="storage"/>. Primarily for tests.</param>
public DeploymentManagerActor(
SiteStorageService storage,
ScriptCompilationService compilationService,
@@ -478,6 +478,13 @@ public class ScriptActor : ReceiveActor, IWithTimers
// internal (not private) so the culture-invariance of the non-numeric fallback
// can be unit-tested directly on the test thread — the live path evaluates on a
// dispatcher thread whose CurrentCulture the test cannot deterministically set.
/// <summary>
/// Evaluates a conditional trigger's operator/threshold against an attribute value,
/// converting the value to a culture-invariant double before comparing.
/// </summary>
/// <param name="config">The trigger configuration specifying the operator and threshold.</param>
/// <param name="value">The attribute value to evaluate, or null.</param>
/// <returns><see langword="true"/> if the value satisfies the configured condition; otherwise <see langword="false"/>.</returns>
internal static bool EvaluateCondition(ConditionalTriggerConfig config, object? value)
{
if (value == null) return false;
@@ -230,9 +230,17 @@ public sealed class SiteReconciliationActor : ReceiveActor, IWithTimers
/// <summary>Summary of one reconcile pass, piped to <c>Self</c> for logging.</summary>
private sealed record ReconcilePassResult(int Fetched, int Failed, int Orphans, Exception? Error)
{
/// <summary>Creates a result for a reconcile pass that ran to completion.</summary>
/// <param name="fetched">Number of instances successfully fetched/reconciled.</param>
/// <param name="failed">Number of instances that failed to reconcile.</param>
/// <param name="orphans">Number of local instances no longer deployed at central.</param>
/// <returns>A completed <see cref="ReconcilePassResult"/> with no error.</returns>
public static ReconcilePassResult Completed(int fetched, int failed, int orphans)
=> new(fetched, failed, orphans, null);
/// <summary>Creates a result for a reconcile pass that failed before completing.</summary>
/// <param name="error">The exception that caused the pass to fail.</param>
/// <returns>A faulted <see cref="ReconcilePassResult"/> carrying the error.</returns>
public static ReconcilePassResult Faulted(Exception error)
=> new(0, 0, 0, error);
}
@@ -59,6 +59,8 @@ public class SiteReplicationActor : ReceiveActor
/// the repo-standard leader+Up check via <see cref="Cluster"/> — swap point for
/// plan 01's shared active-node helper.
/// </param>
/// <param name="options">Site runtime options, including the config-fetch retry count; production defaults apply when null.</param>
/// <param name="configFetchRetryDelay">Delay between config-fetch retry attempts; defaults to 2 seconds when null.</param>
public SiteReplicationActor(
SiteStorageService storage,
StoreAndForwardStorage sfStorage,
@@ -217,6 +219,7 @@ public class SiteReplicationActor : ReceiveActor
/// (fire-and-forget, dropped when no peer is tracked). <see langword="protected virtual"/>
/// so tests can intercept the peer send without standing up a real two-node cluster.
/// </summary>
/// <param name="message">The replication message to forward to the peer.</param>
protected virtual void SendToPeer(object message)
{
if (_peerAddress == null)
@@ -410,7 +413,7 @@ public class SiteReplicationActor : ReceiveActor
/// <summary>
/// Standby-node side of the anti-entropy resync: replaces the local buffer
/// wholesale with the active node's snapshot. Combined with the upsert-based
/// replicated applies (arch review 02, Task 11), any replicated op that lands
/// replicated applies (arch review 02), any replicated op that lands
/// after this resync merges cleanly onto the resynced state. An active node
/// ignores a snapshot — it is the source of truth, never a resync target.
/// </summary>
@@ -8,12 +8,16 @@ public sealed class HttpDeploymentConfigFetcher : IDeploymentConfigFetcher
private readonly HttpClient _http;
private readonly ILogger<HttpDeploymentConfigFetcher> _log;
/// <summary>Initializes the fetcher with its HTTP client and logger.</summary>
/// <param name="http">The HTTP client used to call central's internal endpoint.</param>
/// <param name="log">Logger for fetch diagnostics.</param>
public HttpDeploymentConfigFetcher(HttpClient http, ILogger<HttpDeploymentConfigFetcher> log)
{
_http = http;
_log = log;
}
/// <inheritdoc />
public async Task<string> FetchAsync(string centralFetchBaseUrl, string deploymentId, string token, CancellationToken ct)
{
var url = $"{centralFetchBaseUrl.TrimEnd('/')}/api/internal/deployments/{Uri.EscapeDataString(deploymentId)}/config";
@@ -12,13 +12,24 @@ public interface IDeploymentConfigFetcher
/// in the X-Deployment-Token header. Throws <see cref="DeploymentConfigFetchException"/>
/// on any non-success; a 404 (expired/superseded/unknown) sets IsSuperseded.
/// </summary>
/// <param name="centralFetchBaseUrl">Base URL of the central fetch endpoint.</param>
/// <param name="deploymentId">Identifier of the deployment whose flattened config is being fetched.</param>
/// <param name="token">Deployment token presented in the X-Deployment-Token header.</param>
/// <param name="ct">Cancellation token for the request.</param>
/// <returns>The flattened config JSON for the requested deployment.</returns>
Task<string> FetchAsync(string centralFetchBaseUrl, string deploymentId, string token, CancellationToken ct);
}
/// <summary>Raised when a deployment-config fetch fails. <see cref="IsSuperseded"/> is true on HTTP 404.</summary>
public sealed class DeploymentConfigFetchException : Exception
{
/// <summary>Gets a value indicating whether the fetch failed because the deployment was expired, superseded, or unknown (HTTP 404).</summary>
public bool IsSuperseded { get; }
/// <summary>Initializes a new instance of the <see cref="DeploymentConfigFetchException"/> class.</summary>
/// <param name="message">The error message.</param>
/// <param name="isSuperseded">Whether the failure was caused by an expired, superseded, or unknown deployment (HTTP 404).</param>
/// <param name="inner">The underlying exception, if any.</param>
public DeploymentConfigFetchException(string message, bool isSuperseded, Exception? inner = null)
: base(message, inner) => IsSuperseded = isSuperseded;
}
@@ -489,6 +489,7 @@ public class SiteStorageService
/// <param name="sourceReference">Source-system reference key identifying the specific alarm condition.</param>
/// <param name="conditionJson">Serialized <see cref="AlarmConditionState"/> JSON snapshot.</param>
/// <param name="lastTransitionAt">Timestamp of the most recent condition transition.</param>
/// <param name="metadataJson">Optional serialized metadata JSON for the alarm condition; <c>null</c> when not supplied.</param>
/// <returns>A task that completes when the alarm condition has been inserted or updated.</returns>
public async Task UpsertNativeAlarmAsync(
string instanceName, string sourceCanonicalName, string sourceReference,
@@ -801,7 +802,7 @@ public class SiteStorageService
/// schema is harmless once empty); only their contents are removed.
///
/// The site-side write paths (<c>StoreNotificationListAsync</c>/<c>StoreSmtpConfigurationAsync</c>)
/// and the <c>SiteNotificationRepository</c> were removed 2026-07-10 (arch-review 08 §1.3/#23)
/// and the <c>SiteNotificationRepository</c> were removed 2026-07-10 (arch-review 08 §1.3)
/// because notification config is central-only and must never be written to a site — this
/// purge is the sole remaining touchpoint, kept only to scrub DBs written by older builds;
/// do not reintroduce site-side notification writes.
@@ -292,6 +292,7 @@ public class ScriptRuntimeContext
/// carried over verbatim from this context.
/// </summary>
/// <param name="childCallDepth">The recursion depth of the shared-script call.</param>
/// <returns>A new child <see cref="ScriptRuntimeContext"/> for the shared-script invocation.</returns>
internal ScriptRuntimeContext CreateChildContextForSharedScript(int childCallDepth)
{
return new ScriptRuntimeContext(
@@ -2199,11 +2200,10 @@ public class ScriptRuntimeContext
target: _listName,
payloadJson: payloadJson,
originInstanceName: _instanceName,
// 0 = the documented "no limit" escape hatch (StoreAndForward-015):
// notifications are retried until central acks and are never parked
// for retry exhaustion — a long central outage must not strand them
// behind per-message operator unparking. (Corrupt payloads still
// park — Task 14.)
// 0 = the documented "no limit" escape hatch: notifications are
// retried until central acks and are never parked for retry
// exhaustion — a long central outage must not strand them behind
// per-message operator unparking. (Corrupt payloads still park.)
maxRetries: 0,
// Never run the forwarder's 30s central Ask inline on the script
// thread: buffer due-immediately and kick the sweep. Send returns
@@ -24,6 +24,10 @@ internal readonly record struct TriggerRoutingDecision(TriggerRoutingKind Kind,
{
public static readonly TriggerRoutingDecision AllChanges = new(TriggerRoutingKind.AllChanges, null);
public static readonly TriggerRoutingDecision None = new(TriggerRoutingKind.None, null);
/// <summary>Creates a decision routing on changes to a single named attribute.</summary>
/// <param name="attribute">The name of the attribute to monitor.</param>
/// <returns>A <see cref="TriggerRoutingDecision"/> of kind <see cref="TriggerRoutingKind.MonitoredAttribute"/>.</returns>
public static TriggerRoutingDecision Monitored(string attribute) => new(TriggerRoutingKind.MonitoredAttribute, attribute);
}
@@ -44,6 +48,9 @@ internal static class TriggerRouting
/// <c>"attributeName"</c> (scripts + alarms) and <c>"attribute"</c> (alarm alias) keys.
/// Returns false when the JSON is missing, malformed, or carries no attribute name.
/// </summary>
/// <param name="triggerConfigJson">The trigger config JSON to read from.</param>
/// <param name="attribute">When this method returns, the monitored attribute name, or an empty string if not found.</param>
/// <returns><c>true</c> if an attribute name was found; otherwise <c>false</c>.</returns>
public static bool TryReadAttributeName(string? triggerConfigJson, out string attribute)
{
attribute = "";
@@ -76,6 +83,9 @@ internal static class TriggerRouting
/// unknown → all-changes (fail open — a misconfigured script still reacts, its own gate
/// remains the correctness check).
/// </summary>
/// <param name="triggerType">The script's trigger type (e.g. "valuechange", "expression", "interval", "call").</param>
/// <param name="triggerConfigJson">The trigger config JSON, used to extract the monitored attribute name where applicable.</param>
/// <returns>The routing decision for the script's trigger.</returns>
public static TriggerRoutingDecision ForScript(string? triggerType, string? triggerConfigJson)
{
switch (triggerType?.ToLowerInvariant())
@@ -100,6 +110,9 @@ internal static class TriggerRouting
/// RateOfChange → the named attribute (fail open to all-changes if unparseable); an
/// unknown/unparseable trigger type → all-changes (fail open).
/// </summary>
/// <param name="triggerType">The alarm's trigger type (e.g. "Expression", "HiLo", "ValueMatch").</param>
/// <param name="triggerConfigJson">The trigger config JSON, used to extract the monitored attribute name where applicable.</param>
/// <returns>The routing decision for the alarm's trigger.</returns>
public static TriggerRoutingDecision ForAlarm(string? triggerType, string? triggerConfigJson)
{
if (Enum.TryParse<AlarmTriggerType>(triggerType, ignoreCase: true, out var tt))
@@ -381,7 +381,7 @@ public class OperationTrackingStore : IOperationTrackingStore, IAsyncDisposable,
await using var cmd = readConnection.CreateCommand();
// Composite (UpdatedAtUtc, TrackedOperationId) keyset (Task 15). Ordering
// Composite (UpdatedAtUtc, TrackedOperationId) keyset. Ordering
// is ALWAYS deterministic (UpdatedAtUtc ASC, TrackedOperationId ASC) so the
// cursor is well-defined even when many rows share one UpdatedAtUtc.
// • afterId present → strict keyset: skip everything up to and including