chore(historian): batch-era defaults + appsettings/doc alignment

This commit is contained in:
Joseph Doherty
2026-08-16 04:48:55 -04:00
parent 5b92eb0ff6
commit 0298a0b944
6 changed files with 117 additions and 7 deletions
@@ -36,6 +36,26 @@ public sealed class ContinuousHistorizationOptionsTests
}.Validate(),
m => m.Contains("CommitIntervalMs"));
/// <summary>
/// Pins the shipped defaults, which are a tuned set rather than arbitrary numbers: the drain is
/// bounded-parallel over an in-memory peek (so a wide <c>DrainBatchSize</c> is cheap and a narrow
/// one lets the outbox fill during a gateway hiccup), <c>Capacity</c> is the #538 disk backstop,
/// and <c>MaxWriteAttempts</c> is the #538 poison-tag budget. The shipped
/// <c>appsettings.json</c> restates these values, so a silent drift between the two is exactly
/// what this test exists to catch.
/// </summary>
[Fact]
public void Defaults_are_the_documented_batch_era_values()
{
var options = new ContinuousHistorizationOptions();
Assert.Equal("PerEntry", options.CommitMode);
Assert.Equal(1024, options.DrainBatchSize);
Assert.Equal(8, options.DrainConcurrency);
Assert.Equal(500_000, options.Capacity);
Assert.Equal(5, options.MaxWriteAttempts);
}
/// <summary>A fully-configured enabled recorder produces no warnings.</summary>
[Fact]
public void Valid_config_is_clean()