# Digest Windows and Throttling ## Module Notifier ## Status VERIFIED ## Description Digest generation for coalescing notifications within configurable time windows. ## Implementation Details - **INotifyThrottler interface**: `src/Notifier/StellaOps.Notifier/StellaOps.Notifier.Worker/Correlation/NotifyThrottler.cs` -- `RecordEventAsync`, `CheckAsync` (with configurable window/maxEvents), `ClearAsync` for per-key throttle management - **InMemoryNotifyThrottler**: `src/Notifier/StellaOps.Notifier/StellaOps.Notifier.Worker/Correlation/NotifyThrottler.cs` -- in-memory sliding window throttler with `ConcurrentDictionary`, `ThrottlerOptions` for default window/max - **IThrottleConfigService**: `src/Notifier/StellaOps.Notifier/StellaOps.Notifier.Worker/Correlation/IThrottleConfigService.cs` -- per-tenant throttle configuration - **ThrottleConfigService**: `src/Notifier/StellaOps.Notifier/StellaOps.Notifier.Worker/Correlation/ThrottleConfigService.cs` -- resolves throttle windows per event kind - **ThrottleConfigurationService**: `src/Notifier/StellaOps.Notifier/StellaOps.Notifier.Worker/Correlation/ThrottleConfigurationService.cs` -- advanced throttle configuration management - **QuietHoursServiceExtensions**: `src/Notifier/StellaOps.Notifier/StellaOps.Notifier.Worker/Correlation/QuietHoursServiceExtensions.cs` -- quiet hours integration with throttling - **ThrottleEndpoints**: `src/Notifier/StellaOps.Notifier/StellaOps.Notifier.WebService/Endpoints/ThrottleEndpoints.cs` -- REST API for throttle configuration - **QuietHoursContracts**: `src/Notifier/StellaOps.Notifier/StellaOps.Notifier.WebService/Contracts/QuietHoursContracts.cs` -- quiet hours request/response models - **IOperatorOverrideService**: `src/Notifier/StellaOps.Notifier/StellaOps.Notifier.Worker/Correlation/IOperatorOverrideService.cs` -- operator override for throttle bypass - **OperatorOverrideService**: `src/Notifier/StellaOps.Notifier/StellaOps.Notifier.Worker/Correlation/OperatorOverrideService.cs` -- operator override implementation - **OperatorOverrideEndpoints**: `src/Notifier/StellaOps.Notifier/StellaOps.Notifier.WebService/Endpoints/OperatorOverrideEndpoints.cs` -- REST API for operator overrides - **Tests**: `src/Notifier/StellaOps.Notifier/StellaOps.Notifier.Tests/Correlation/NotifyThrottlerTests.cs`, `ThrottleConfigServiceTests.cs`, `ThrottleConfigurationServiceTests.cs`, `src/Notifier/StellaOps.Notifier/StellaOps.Notifier.Tests/Endpoints/SuppressionEndpointsTests.cs` - **Source**: Feature matrix scan ## E2E Test Plan - [x] Verify sliding window throttling suppresses notifications exceeding maxEvents within window - [x] Test per-tenant throttle configuration via ThrottleEndpoints API - [x] Verify quiet hours suppress notifications during configured periods - [x] Test operator override allows bypassing throttle for specific keys - [x] Verify throttle state clears after incident resolution - [ ] Test throttle configuration persists across service restarts ## Verification - Verified on 2026-02-11 with `run-002`. - Tier 0 source checks passed for throttler, throttle configuration, quiet-hours, and operator override services/endpoints. - Tier 1 passed after fixing missing DI registrations that made `/api/v2/throttles`, `/api/v2/quiet-hours`, and `/api/v2/overrides` unusable at runtime; focused suppression suite passed (`53/53`) and full Notifier suite passed (`513/513`). - Tier 2 API behavior checks passed for positive and negative user flows across throttle config round-trip, delete fallback, quiet-hours evaluation, override bypass checks, and throttle clear lifecycle behavior. - Note: throttle/quiet-hours configuration is currently in-memory and not guaranteed to persist across process restarts. - Evidence: - `docs/qa/feature-checks/runs/notifier/digest-windows-and-throttling/run-002/tier0-source-check.json` - `docs/qa/feature-checks/runs/notifier/digest-windows-and-throttling/run-002/tier1-build-check.json` - `docs/qa/feature-checks/runs/notifier/digest-windows-and-throttling/run-002/tier2-api-check.json`