mbproxy: strip historical phase/wave/plan references from source comments
Comments described the *history* of how the code arrived (phase numbers, wave IDs, review IDs, dated TODOs) instead of what it does today. That scaffolding rotted as the codebase evolved. Cleaned 60 source files + .gitignore; behaviour unchanged (387/387 tests still pass). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -282,12 +282,12 @@ public sealed class ConfigReconcilerTests : IAsyncDisposable
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Phase 12 (W3 test gap #16) — stress-test the W2.3 ConcurrentDictionary fix and the
|
||||
/// W2.1 coalescing-accessor wiring. Many concurrent Apply calls drive add/remove of
|
||||
/// many distinct PLCs; without W2.3's ConcurrentDictionary the inner Task.WhenAll
|
||||
/// continuations would corrupt the dictionary and crash with KeyNotFoundException or
|
||||
/// ArgumentException. The test asserts: all applies complete, no exceptions are
|
||||
/// thrown, and the reload counter is exactly the apply count.
|
||||
/// Stress-tests the live supervisor dictionary and the coalescing-accessor wiring.
|
||||
/// Many concurrent Apply calls drive add/remove of many distinct PLCs; the inner
|
||||
/// Task.WhenAll continuations must not corrupt the dictionary or crash with
|
||||
/// KeyNotFoundException or ArgumentException. The test asserts: all applies
|
||||
/// complete, no exceptions are thrown, and the reload counter is exactly the
|
||||
/// apply count.
|
||||
/// </summary>
|
||||
[Fact(Timeout = 30_000)]
|
||||
public async Task Apply_ManyConcurrentReloads_With_PlcChurn_NoCorruption()
|
||||
@@ -305,7 +305,7 @@ public sealed class ConfigReconcilerTests : IAsyncDisposable
|
||||
|
||||
// Build 8 different option snapshots, each a different PLC roster.
|
||||
// Each Apply will trigger Add+Remove churn against the live supervisor dict —
|
||||
// exactly the path that W2.3's ConcurrentDictionary was needed for.
|
||||
// exactly the path that the ConcurrentDictionary guards against corruption.
|
||||
const int snapshots = 8;
|
||||
const int plcsPerSnapshot = 4;
|
||||
var snaps = new MbproxyOptions[snapshots];
|
||||
@@ -324,8 +324,8 @@ public sealed class ConfigReconcilerTests : IAsyncDisposable
|
||||
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(25));
|
||||
|
||||
// Fire 16 concurrent applies cycling through the 8 snapshots so each is
|
||||
// submitted twice. Inner per-PLC Task.WhenAll continuations from W2.3 will run
|
||||
// in parallel and stress-test the dictionary mutation safety.
|
||||
// submitted twice. Inner per-PLC Task.WhenAll continuations run in parallel
|
||||
// and stress-test the dictionary mutation safety.
|
||||
var tasks = Enumerable.Range(0, 16)
|
||||
.Select(i => Task.Run(() => reconciler.ApplyAsync(snaps[i % snapshots], cts.Token), cts.Token))
|
||||
.ToArray();
|
||||
|
||||
Reference in New Issue
Block a user