chore(saf): eagerly validate SweepBatchLimit/SweepTargetParallelism (plan R2-02 T9)

This commit is contained in:
Joseph Doherty
2026-07-13 10:10:34 -04:00
parent 61442b5f81
commit cc4ff7029d
2 changed files with 37 additions and 0 deletions
@@ -31,5 +31,13 @@ public sealed class StoreAndForwardOptionsValidator : OptionsValidatorBase<Store
builder.RequireThat(options.DefaultMaxRetries >= 0,
$"ScadaBridge:StoreAndForward:DefaultMaxRetries must be >= 0 " +
$"(was {options.DefaultMaxRetries}).");
builder.RequireThat(options.SweepBatchLimit >= 0,
$"ScadaBridge:StoreAndForward:SweepBatchLimit must be >= 0 " +
$"(was {options.SweepBatchLimit}); it bounds due rows per retry sweep — 0 means unlimited (legacy).");
builder.RequireThat(options.SweepTargetParallelism >= 1,
$"ScadaBridge:StoreAndForward:SweepTargetParallelism must be >= 1 " +
$"(was {options.SweepTargetParallelism}); it caps concurrent (category,target) sweep lanes — 1 means serial.");
}
}