namespace ZB.MOM.WW.OtOpcUa.Core.Abstractions;
///
/// Legal ranges for per-capability resilience policy values. Single source of truth shared by
/// DriverResilienceOptionsParser (clamp + diagnostic), DriverResiliencePipelineBuilder
/// (last-resort clamp so a pipeline build can never throw Polly's ValidationException), and the
/// AdminUI ResilienceFormModel (authoring-time validation messages). Derived from
/// Polly.Core 8.6.6's option validation: TimeoutStrategyOptions.Timeout ∈ [10 ms, 24 h];
/// CircuitBreakerStrategyOptions.MinimumThroughput ≥ 2.
///
public static class ResiliencePolicyRanges
{
/// Minimum per-call timeout. Whole-second granularity puts the floor at 1 s (Polly's is 10 ms).
public const int MinTimeoutSeconds = 1;
/// Maximum per-call timeout — Polly's TimeoutStrategyOptions ceiling (24 h).
public const int MaxTimeoutSeconds = 86_400;
/// Retry floor; 0 = no retry strategy is added to the pipeline.
public const int MinRetryCount = 0;
/// Operational retry cap (Polly itself allows int.MaxValue; 100 exponential-backoff attempts ≈ minutes).
public const int MaxRetryCount = 100;
/// Breaker floor; 0 = no breaker strategy is added (the Tier C posture).
public const int MinBreakerFailureThreshold = 0;
/// Polly's MinimumThroughput floor — an enabled breaker needs a threshold of at least 2.
public const int MinEnabledBreakerFailureThreshold = 2;
/// Sanity cap on the breaker threshold (Polly has no ceiling; beyond this it can never trip in the 30 s window).
public const int MaxBreakerFailureThreshold = 10_000;
}