docs(src): add missing XML docs and strip tracking-ID comments
Sweep of 203 source files resolving CommentChecker findings: add <summary>/<param>/<returns>/<inheritdoc> where missing, and remove resolved task/issue tracking markers (Tests-NNN, Worker-NNN, Server-NNN, Task N) from code comments. Comment/doc-only — no logic changes. Server+Tests build clean under TreatWarningsAsErrors.
This commit is contained in:
@@ -78,10 +78,10 @@ public sealed class WorkerClient : IWorkerClient
|
||||
_lastHeartbeatAt = _timeProvider.GetUtcNow();
|
||||
}
|
||||
|
||||
/// <summary>Gets the worker's session ID.</summary>
|
||||
/// <inheritdoc />
|
||||
public string SessionId => _connection.SessionId;
|
||||
|
||||
/// <summary>Gets the worker process ID.</summary>
|
||||
/// <inheritdoc />
|
||||
public int? ProcessId
|
||||
{
|
||||
get
|
||||
@@ -93,7 +93,7 @@ public sealed class WorkerClient : IWorkerClient
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the current client state.</summary>
|
||||
/// <inheritdoc />
|
||||
public WorkerClientState State
|
||||
{
|
||||
get
|
||||
@@ -105,7 +105,7 @@ public sealed class WorkerClient : IWorkerClient
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the timestamp of the last received heartbeat.</summary>
|
||||
/// <inheritdoc />
|
||||
public DateTimeOffset LastHeartbeatAt
|
||||
{
|
||||
get
|
||||
@@ -117,8 +117,7 @@ public sealed class WorkerClient : IWorkerClient
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Starts the worker client and completes the handshake.</summary>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <inheritdoc />
|
||||
public async Task StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
@@ -141,11 +140,7 @@ public sealed class WorkerClient : IWorkerClient
|
||||
_heartbeatLoopTask = Task.Run(HeartbeatLoopAsync);
|
||||
}
|
||||
|
||||
/// <summary>Invokes a command on the worker and waits for reply.</summary>
|
||||
/// <param name="command">The command to invoke.</param>
|
||||
/// <param name="timeout">Command timeout.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>The command reply.</returns>
|
||||
/// <inheritdoc />
|
||||
public async Task<WorkerCommandReply> InvokeAsync(
|
||||
WorkerCommand command,
|
||||
TimeSpan timeout,
|
||||
@@ -228,9 +223,7 @@ public sealed class WorkerClient : IWorkerClient
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Reads events from the worker as an async stream.</summary>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <returns>Async enumerable of worker events.</returns>
|
||||
/// <inheritdoc />
|
||||
public async IAsyncEnumerable<WorkerEvent> ReadEventsAsync(
|
||||
[EnumeratorCancellation] CancellationToken cancellationToken)
|
||||
{
|
||||
@@ -242,9 +235,7 @@ public sealed class WorkerClient : IWorkerClient
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Shuts down the worker gracefully.</summary>
|
||||
/// <param name="timeout">Shutdown timeout.</param>
|
||||
/// <param name="cancellationToken">Cancellation token.</param>
|
||||
/// <inheritdoc />
|
||||
public async Task ShutdownAsync(TimeSpan timeout, CancellationToken cancellationToken)
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
@@ -289,8 +280,7 @@ public sealed class WorkerClient : IWorkerClient
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Terminates the worker process immediately.</summary>
|
||||
/// <param name="reason">Reason for termination.</param>
|
||||
/// <inheritdoc />
|
||||
public void Kill(string reason)
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
@@ -302,6 +292,7 @@ public sealed class WorkerClient : IWorkerClient
|
||||
}
|
||||
|
||||
/// <summary>Disposes the worker client and releases resources.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
if (_disposed)
|
||||
@@ -390,13 +381,13 @@ public sealed class WorkerClient : IWorkerClient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Monitors worker heartbeat and detects stale sessions. Mirrors
|
||||
/// Worker-023 on the worker side: while a command is in flight on the
|
||||
/// Monitors worker heartbeat and detects stale sessions. Mirrors the
|
||||
/// worker-side watchdog: while a command is in flight on the
|
||||
/// gateway↔worker pipe, the heartbeat watchdog is suppressed up to
|
||||
/// <see cref="WorkerClientOptions.HeartbeatStuckCeiling"/> — the worker
|
||||
/// may be busy executing a slow STA command and the heartbeat write may
|
||||
/// be queued behind a long event-drain burst (Server-031), neither of
|
||||
/// which indicates the worker is actually hung. Once the oldest pending
|
||||
/// be queued behind a long event-drain burst, neither of which
|
||||
/// indicates the worker is actually hung. Once the oldest pending
|
||||
/// command exceeds the ceiling, the fault fires anyway so a truly stuck
|
||||
/// COM call doesn't hide the worker forever.
|
||||
/// </summary>
|
||||
@@ -419,11 +410,6 @@ public sealed class WorkerClient : IWorkerClient
|
||||
continue;
|
||||
}
|
||||
|
||||
// Server-031: if a command is in flight and hasn't yet exceeded
|
||||
// the stuck-command ceiling, the gap is more likely caused by
|
||||
// pipe-write contention (event drain holding the writer lock)
|
||||
// or a legitimately slow STA command than by a hung worker.
|
||||
// Wait for the ceiling before faulting on heartbeat alone.
|
||||
if (TryGetOldestPendingCommandAge(out TimeSpan oldestCommandAge)
|
||||
&& oldestCommandAge <= _options.HeartbeatStuckCeiling)
|
||||
{
|
||||
@@ -446,7 +432,7 @@ public sealed class WorkerClient : IWorkerClient
|
||||
/// Returns the age of the oldest pending command on the worker pipe,
|
||||
/// measured via <see cref="TimeProvider.GetElapsedTime(long)"/> against
|
||||
/// <see cref="PendingCommand.StartTimestamp"/>, or <c>false</c> when no
|
||||
/// commands are pending. Used by the heartbeat watchdog (Server-031)
|
||||
/// commands are pending. Used by the heartbeat watchdog
|
||||
/// to decide whether a heartbeat gap is plausibly the result of
|
||||
/// pipe-write contention rather than a hung worker.
|
||||
/// </summary>
|
||||
@@ -508,12 +494,12 @@ public sealed class WorkerClient : IWorkerClient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enqueues a worker event for client consumption. Server-032: the
|
||||
/// channel is configured with <see cref="BoundedChannelFullMode.Wait"/>
|
||||
/// and a brief consumer hiccup is now tolerated for up to
|
||||
/// Enqueues a worker event for client consumption. The channel is
|
||||
/// configured with <see cref="BoundedChannelFullMode.Wait"/>
|
||||
/// and a brief consumer hiccup is tolerated for up to
|
||||
/// <see cref="WorkerClientOptions.EventChannelFullModeTimeout"/>
|
||||
/// (default 5s) before the worker is faulted. Pre-Server-032 the code
|
||||
/// used <c>TryWrite</c> (non-blocking) which never honored the
|
||||
/// (default 5s) before the worker is faulted. The channel previously
|
||||
/// used <c>TryWrite</c> (non-blocking), which never honored the
|
||||
/// configured <c>FullModeTimeout</c> — the worker faulted on the first
|
||||
/// missed slot even though the wait-mode channel would have absorbed
|
||||
/// the burst. The diagnostic now names the capacity, current depth, and
|
||||
@@ -538,8 +524,6 @@ public sealed class WorkerClient : IWorkerClient
|
||||
return;
|
||||
}
|
||||
|
||||
// Channel is full; honor the configured wait timeout before declaring
|
||||
// the consumer dead and faulting the worker (Server-032).
|
||||
using CancellationTokenSource fullModeCts = CancellationTokenSource
|
||||
.CreateLinkedTokenSource(cancellationToken);
|
||||
fullModeCts.CancelAfter(_options.EventChannelFullModeTimeout);
|
||||
|
||||
Reference in New Issue
Block a user