docs: strip task-tracking IDs from code comments and fill missing XML docs
Tracking IDs are review bookkeeping that rots in shipped source; the rationale they tagged is kept. Comment-only change (CommentChecker 458 -> 16 false positives).
This commit is contained in:
@@ -108,7 +108,7 @@ public sealed class MxStatusProxyConverterTests
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that repeated conversions of the same status type produce
|
||||
/// identical results. WRK-06 caches the resolved FieldInfo objects per
|
||||
/// identical results. The converter caches the resolved FieldInfo objects per
|
||||
/// type after the first conversion; the cached path must yield the same
|
||||
/// message the uncached first call produced.
|
||||
/// </summary>
|
||||
@@ -137,7 +137,7 @@ public sealed class MxStatusProxyConverterTests
|
||||
|
||||
/// <summary>
|
||||
/// Verifies every accessor strategy converts the same status values
|
||||
/// identically. PERF-20 reads a public field of a publicly visible type
|
||||
/// identically. The converter reads a public field of a publicly visible type
|
||||
/// through a delegate compiled from an expression tree instead of
|
||||
/// <c>FieldInfo.GetValue</c>; a field type whose conversion to int is not
|
||||
/// a lossless widening (<see cref="FakeWideStatusProxy"/>) and a type the
|
||||
|
||||
@@ -521,7 +521,7 @@ public sealed class WorkerFrameProtocolTests
|
||||
/// Control-frame completion decoupling. The boundary flush is charged per class run, not per
|
||||
/// control frame: a pass carrying nothing but control frames still pays exactly one flush. Flushing
|
||||
/// after every control frame
|
||||
/// would reinstate the syscall-per-heartbeat cost WRK-12 removed.
|
||||
/// would reinstate the syscall-per-heartbeat cost the earlier per-frame flush design incurred.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
@@ -592,7 +592,7 @@ public sealed class WorkerFrameProtocolTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies a per-frame rejection does not burn a sequence number (WRK-23). The sequence is a
|
||||
/// Verifies a per-frame rejection does not burn a sequence number. The sequence is a
|
||||
/// diagnostic counter, so a gap breaks nothing functionally — but an operator correlating a pipe
|
||||
/// capture reads a gap as a lost frame and chases a bug that does not exist, and the gap-free
|
||||
/// guarantee the concurrent-write test asserts would otherwise only hold until the first
|
||||
@@ -664,7 +664,7 @@ public sealed class WorkerFrameProtocolTests
|
||||
|
||||
/// <summary>
|
||||
/// Verifies a negotiated frame maximum below the worker floor is rejected as
|
||||
/// <c>InvalidConfiguration</c> (WRK-24), and that exactly the floor is adopted. The floor matches
|
||||
/// <c>InvalidConfiguration</c> and that exactly the floor is adopted. The floor matches
|
||||
/// the gateway's own <c>GatewayOptionsValidator.MinimumMaxMessageBytes</c>, so the worker never
|
||||
/// rejects a value the gateway's validator accepts, yet a nonsensical tiny value faults at the
|
||||
/// handshake instead of leaving a session that fails every later frame.
|
||||
@@ -684,7 +684,7 @@ public sealed class WorkerFrameProtocolTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WRK-22 / IPC-26. A <c>WriteAsync</c> cancelled while it waits for the write lock must never
|
||||
/// A <c>WriteAsync</c> cancelled while it waits for the write lock must never
|
||||
/// have its frame written by the next lock-holder. Writer A holds the lock mid-write (blocked in
|
||||
/// the stream); an event write is queued and then cancelled; when A is released and a later
|
||||
/// control frame drains, the wire carries A's frame and the control frame only — the cancelled
|
||||
@@ -727,7 +727,7 @@ public sealed class WorkerFrameProtocolTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// NEXT-04. A frame claimed by the draining lock-holder before its caller's cancellation lands
|
||||
/// A frame claimed by the draining lock-holder before its caller's cancellation lands
|
||||
/// is abandoned — the cancelled caller never awaits its completion. If the wire write then
|
||||
/// faults, the tombstone path's fault-observing continuation must still observe the exception
|
||||
/// so it never surfaces as <see cref="TaskScheduler.UnobservedTaskException"/>.
|
||||
@@ -791,7 +791,7 @@ public sealed class WorkerFrameProtocolTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WRK-22 / IPC-26, the review's shutdown scenario. A cancelled event frame queued before a
|
||||
/// Shutdown scenario: a cancelled event frame queued before a
|
||||
/// shutdown-ack control frame must not trail the ack on the wire: the tombstone rule plus the
|
||||
/// control-before-event scheduler keeps the ack the last frame written.
|
||||
/// </summary>
|
||||
@@ -830,9 +830,9 @@ public sealed class WorkerFrameProtocolTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WRK-25. The batch entry point enqueues a whole event burst under one lock acquisition and
|
||||
/// The batch entry point enqueues a whole event burst under one lock acquisition and
|
||||
/// drains it together, so N events cost exactly one flush and reach the wire in batch order with
|
||||
/// monotonic sequences — the coalescing WRK-12 shipped, now on the event hot path.
|
||||
/// monotonic sequences — the flush coalescing now on the event hot path.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
@@ -868,7 +868,7 @@ public sealed class WorkerFrameProtocolTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WRK-25. Control-before-event still holds mid-batch: a control frame queued while a batch is
|
||||
/// Control-before-event still holds mid-batch: a control frame queued while a batch is
|
||||
/// draining jumps ahead of the batch's remaining events.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
@@ -1223,7 +1223,7 @@ public sealed class WorkerFrameProtocolTests
|
||||
|
||||
// A MemoryStream whose first write blocks until released and whose second write blocks until
|
||||
// released and then throws, so a test can abandon a claimed frame by cancellation and fault its
|
||||
// wire write afterwards (NEXT-04).
|
||||
// wire write afterwards.
|
||||
private sealed class SecondWriteFaultingGatedStream : MemoryStream
|
||||
{
|
||||
private readonly SemaphoreSlim _firstRelease = new SemaphoreSlim(0);
|
||||
@@ -1235,6 +1235,8 @@ public sealed class WorkerFrameProtocolTests
|
||||
private readonly string _faultMessage;
|
||||
private int _writeCount;
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="SecondWriteFaultingGatedStream"/> class.</summary>
|
||||
/// <param name="faultMessage">The message of the exception thrown by the second write.</param>
|
||||
public SecondWriteFaultingGatedStream(string faultMessage)
|
||||
{
|
||||
_faultMessage = faultMessage;
|
||||
|
||||
@@ -20,7 +20,7 @@ public sealed class WorkerPipeSessionTests
|
||||
private const string SessionId = "session-1";
|
||||
private const string Nonce = "nonce-secret";
|
||||
|
||||
// Byte-heavy drain fixture (WRK-21). 10,000 events at ~1.7 KiB each is ~17 MB of queue — far
|
||||
// Byte-heavy drain fixture. 10,000 events at ~1.7 KiB each is ~17 MB of queue — far
|
||||
// more than one frame — so DrainEvents must truncate.
|
||||
//
|
||||
// Two limits below are harness accommodations, not properties of the fix. PipePair runs both
|
||||
@@ -559,7 +559,7 @@ public sealed class WorkerPipeSessionTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The WRK-21 repro. A queue full of byte-heavy events (large string values — the payload
|
||||
/// The repro for the oversized drain reply. A queue full of byte-heavy events (large string values — the payload
|
||||
/// profile this gateway exists for) used to make <c>DrainEvents max_events = 0</c> build a
|
||||
/// reply above the negotiated frame maximum: the writer rejected the frame, the exception
|
||||
/// unwound the session, and the already-dequeued events were gone. The drain is now
|
||||
@@ -703,7 +703,7 @@ public sealed class WorkerPipeSessionTests
|
||||
{
|
||||
// The lowest Worker.MaxMessageBytes GatewayOptionsValidator permits: the public gRPC floor
|
||||
// (1024) plus the 64 KiB envelope-overhead reserve. The naive budget — frame max less the
|
||||
// two reserves the DrainEvents budget subtracts (IPC-33) — would be negative here; the
|
||||
// two reserves the DrainEvents budget subtracts — would be negative here; the
|
||||
// floored budget is half of the frame max (~33 KiB).
|
||||
const uint validatorFloorFrameMax = 1024 + (64 * 1024);
|
||||
using CancellationTokenSource cancellation = new(TimeSpan.FromSeconds(60));
|
||||
@@ -761,7 +761,7 @@ public sealed class WorkerPipeSessionTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies the control-reply write seam is not session-fatal on size (WRK-21 backstop). The
|
||||
/// Verifies the control-reply write seam is not session-fatal on size (the drain backstop). The
|
||||
/// reply builders size their payloads, so this path needs a deliberately budget-blind drain
|
||||
/// to reach — but that is the point: a future command or a sizing bug must degrade to an
|
||||
/// error reply for that correlation, never to a dead session.
|
||||
@@ -859,7 +859,7 @@ public sealed class WorkerPipeSessionTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// IPC-30. An event above the negotiated frame maximum is undeliverable end to end (the pipe
|
||||
/// An event above the negotiated frame maximum is undeliverable end to end (the pipe
|
||||
/// maximum sits only an envelope reserve above the public gRPC cap), so the session stays
|
||||
/// fatal by design — but the death must be structured: a WorkerFault naming the event, with
|
||||
/// no value payload in it, before the process exits. Silently dropping the event or
|
||||
@@ -915,7 +915,7 @@ public sealed class WorkerPipeSessionTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WRK-31, the other side of the invariant. The graceful path leaves the message loop
|
||||
/// The other side of the transport-ownership invariant. The graceful path leaves the message loop
|
||||
/// through its <c>return</c> after the shutdown ack, with that iteration's read already
|
||||
/// awaited — so there is no abandoned read for teardown to account for. Pinning this keeps
|
||||
/// the new disposal-and-observe step a pure no-op on the path production takes every time a
|
||||
@@ -955,7 +955,7 @@ public sealed class WorkerPipeSessionTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WRK-31. The session now owns and closes the transport rather than leaving it to
|
||||
/// The session now owns and closes the transport rather than leaving it to
|
||||
/// <c>WorkerPipeClient</c>'s <c>using</c>, because the read it unblocks has to be observed
|
||||
/// while the session still holds it. This asserts the closure actually happens on the
|
||||
/// session's own timeline: the gateway end of the pipe must see disconnection while
|
||||
@@ -1250,7 +1250,7 @@ public sealed class WorkerPipeSessionTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WRK-27. An STA call outside the command dispatcher (the alarm poll) advertises itself on
|
||||
/// An STA call outside the command dispatcher (the alarm poll) advertises itself on
|
||||
/// the heartbeat snapshot's <c>StaCallInProgress</c> flag, and the watchdog grants it the same
|
||||
/// grace-to-ceiling suppression as a dispatched command: stale STA activity within the ceiling
|
||||
/// does not fault while the flag is set, but stale activity beyond the ceiling faults anyway.
|
||||
@@ -1340,8 +1340,8 @@ public sealed class WorkerPipeSessionTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WRK-25. The event drain loop submits a whole drained batch through the writer's batch entry
|
||||
/// point, so a burst of 128 events costs one flush, not 128 — the assertion the WRK-12
|
||||
/// The event drain loop submits a whole drained batch through the writer's batch entry
|
||||
/// point, so a burst of 128 events costs one flush, not 128 — the assertion the
|
||||
/// tracking claim needed to actually hold on the event hot path.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
@@ -1413,7 +1413,7 @@ public sealed class WorkerPipeSessionTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WRK-24. A GatewayHello negotiating a frame maximum below the worker floor faults at the
|
||||
/// A GatewayHello negotiating a frame maximum below the worker floor faults at the
|
||||
/// handshake with a fault frame rather than being adopted — mirroring the above-ceiling
|
||||
/// handshake behavior — so a nonsensical tiny value never leaves a session that fails every
|
||||
/// later frame. No message loop is entered.
|
||||
@@ -2338,7 +2338,7 @@ public sealed class WorkerPipeSessionTests
|
||||
public sealed class AbandonedPipeReadTeardownTests
|
||||
{
|
||||
/// <summary>
|
||||
/// WRK-31. A fault exit unwinds the message loop while its frame read is still pending,
|
||||
/// A fault exit unwinds the message loop while its frame read is still pending,
|
||||
/// and on net48 nothing can cancel that read — <c>NamedPipeClientStream.ReadAsync</c>
|
||||
/// ignores the token, so only closing the handle ends it. The session must therefore
|
||||
/// dispose the transport itself and account for the read that disposal unblocks: the
|
||||
|
||||
@@ -2166,14 +2166,17 @@ public sealed class MxAccessCommandExecutorTests
|
||||
/// </summary>
|
||||
private sealed class CompletionCacheEventSink : IMxAccessEventSink, IWriteCompletionCacheProvider
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public MxAccessWriteCompletionCache WriteCompletionCache { get; } = new MxAccessWriteCompletionCache();
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Attach(
|
||||
object mxAccessComObject,
|
||||
string sessionId)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Detach()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -239,14 +239,14 @@ public sealed class MxAccessEventMapperTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies the exact-format fast path PERF-20 added in front of the
|
||||
/// Verifies the exact-format fast path added in front of the
|
||||
/// general parse chain returns exactly what that chain returned. The
|
||||
/// cases cover the captured MXAccess shape (which the fast path is meant
|
||||
/// to catch on a US-shaped host), its zero-padded and second-precision
|
||||
/// siblings, and strings the derived formats cannot match — an ISO
|
||||
/// round-trip form, a long-date form, and a day-first European form —
|
||||
/// which must fall through to the unchanged two-stage chain. The
|
||||
/// expectation is computed with the pre-PERF-20 chain in this test, so it
|
||||
/// expectation is computed with the original chain in this test, so it
|
||||
/// holds on any host culture: the fast path is a shortcut, never a
|
||||
/// different answer.
|
||||
/// </summary>
|
||||
@@ -353,8 +353,8 @@ public sealed class MxAccessEventMapperTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The parse chain exactly as it stood before PERF-20 added the
|
||||
/// exact-format stage, used as the parity oracle above.
|
||||
/// The parse chain exactly as it stood before the
|
||||
/// exact-format stage was added, used as the parity oracle above.
|
||||
/// </summary>
|
||||
/// <param name="text">Timestamp string to parse.</param>
|
||||
/// <param name="utc">The parsed UTC timestamp on success.</param>
|
||||
|
||||
@@ -37,8 +37,7 @@ public sealed class MxAccessEventQueueTests
|
||||
/// <summary>
|
||||
/// Verifies that Enqueue takes ownership of the passed event instead of
|
||||
/// cloning it: the dequeued instance is the very reference passed in, and
|
||||
/// the worker sequence/timestamp are stamped on that same instance
|
||||
/// (WRK-11).
|
||||
/// the worker sequence/timestamp are stamped on that same instance.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void Enqueue_TakesOwnershipOfPassedEventInstance()
|
||||
@@ -105,7 +104,7 @@ public sealed class MxAccessEventQueueTests
|
||||
|
||||
/// <summary>
|
||||
/// Verifies the byte-budgeted drain stops before the budget is exceeded, leaves the
|
||||
/// remainder queued in order, and reports the exact remaining count (WRK-21). Events that
|
||||
/// remainder queued in order, and reports the exact remaining count. Events that
|
||||
/// do not fit must never be dequeued — dequeuing them is how the pre-fix drain lost events
|
||||
/// when the reply frame was rejected.
|
||||
/// </summary>
|
||||
@@ -184,7 +183,7 @@ public sealed class MxAccessEventQueueTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The no-loss half of the WRK-21 acceptance criterion, at full scale. Draining the review's
|
||||
/// The no-loss half of the drain guarantee, at full scale. Draining the review's
|
||||
/// 10,000 byte-heavy events under a budget that fits only a fraction of them per call must
|
||||
/// return every event exactly once and in order: the pre-fix drain removed events from the
|
||||
/// queue before the reply was sized, so a rejected frame destroyed them. This runs at the
|
||||
@@ -258,7 +257,7 @@ public sealed class MxAccessEventQueueTests
|
||||
/// Brackets the byte budget's per-event charge to the exact serialized size of the event.
|
||||
/// The queue measures that size once at enqueue rather than during the drain, so this pins
|
||||
/// the two ends of the charge against the very instance the queue holds: a budget one byte
|
||||
/// short must refuse the head (and leave it queued, WRK-21), and a budget of exactly the
|
||||
/// short must refuse the head (and leave it queued), and a budget of exactly the
|
||||
/// charge must ship it. An undercharge — sizing the event before Enqueue stamps its worker
|
||||
/// sequence and timestamp, say — passes the first probe and breaks the frame guarantee; an
|
||||
/// overcharge of even one byte fails the second. The <c>preStamped</c> case covers an event
|
||||
@@ -371,7 +370,7 @@ public sealed class MxAccessEventQueueTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The other half of the WRK-21 head guarantee: a head refused for its size is drained
|
||||
/// The other half of the head guarantee: a head refused for its size is drained
|
||||
/// unchanged by a later call whose budget fits it. The size the queue charges lives with the
|
||||
/// event across calls, so a refused attempt must neither consume nor alter it — and the
|
||||
/// refusal itself is justified by the event's real serialized size.
|
||||
|
||||
@@ -527,7 +527,7 @@ public sealed class MxAccessStaSessionTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WRK-27. While the alarm poll's PollOnce is executing on the STA, a heartbeat captured mid-poll
|
||||
/// While the alarm poll's PollOnce is executing on the STA, a heartbeat captured mid-poll
|
||||
/// must report <see cref="WorkerRuntimeHeartbeatSnapshot.StaCallInProgress"/> so the watchdog
|
||||
/// grants the poll the same grace-to-ceiling suppression as a dispatched command; once the poll
|
||||
/// returns the flag clears. PollOnce is blocked on a gate so the heartbeat can be captured while
|
||||
|
||||
@@ -319,7 +319,7 @@ public sealed class WnWrapAlarmConsumerXmlTests
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Truncation cliff (Task 23). GetXmlCurrentAlarms2 caps its reply at
|
||||
// Truncation cliff. GetXmlCurrentAlarms2 caps its reply at
|
||||
// maxAlmCnt with no "more available" flag. Before the guard, a capped fetch
|
||||
// shrank the retained snapshot, and every alarm past the cap vanished from
|
||||
// SnapshotActiveAlarms — which the gateway's reconcile pass reads as a
|
||||
@@ -587,7 +587,7 @@ public sealed class WnWrapAlarmConsumerXmlTests
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Single-pass parse parity (Task 23). The per-field SelectSingleNode calls
|
||||
// Single-pass parse parity. The per-field SelectSingleNode calls
|
||||
// were replaced by one walk over ChildNodes; these pin the semantics that
|
||||
// walk has to reproduce.
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@@ -494,7 +494,7 @@ internal sealed class FakeRuntimeSession : IWorkerRuntimeSession
|
||||
/// <summary>
|
||||
/// Enqueues a batch of worker events atomically under one lock so the drain loop cannot
|
||||
/// observe a partial batch. Lets a test assert the drain loop coalesces a whole batch into one
|
||||
/// flush (WRK-25) without racing a mid-enqueue drain that would split the batch.
|
||||
/// flush without racing a mid-enqueue drain that would split the batch.
|
||||
/// </summary>
|
||||
/// <param name="workerEvents">The events to enqueue in order.</param>
|
||||
public void EnqueueEvents(IEnumerable<WorkerEvent> workerEvents)
|
||||
|
||||
Reference in New Issue
Block a user