namespace OpenWaf.Domain.Security; /// /// A 5xx streak. Ruling Q3: server errors are never a reason to ban — a bad /// deploy would ban the site's own honest visitors — but they are a reason to /// wake somebody up. So the same observer that feeds the ban decision emits /// alerts for the 5xx class instead of bans. /// public sealed class EdgeAlert { public long Id { get; init; } public string SourceKey { get; set; } = string.Empty; public string Kind { get; set; } = "server_error_streak"; public int Count { get; set; } public int? LastStatusCode { get; set; } public string? LastPath { get; set; } public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow; public string Detail { get; set; } = string.Empty; }