using System.Text.Json.Serialization; namespace ClawdDotNet.Core.Cases; /// #689: The limits that make escalation end. public sealed class CaseSettings { /// /// Hours the agents have to solve a case. After that a human is called — a case nobody /// can solve must not exist. Short rather than long (decision of 2026-09-22). /// [JsonPropertyName("deadlineHours")] public double DeadlineHours { get; set; } = 4; /// /// Escalations one unit may raise in 24 hours. Beyond that each new one goes straight to /// a human: a unit that hands everything up is itself a finding, and every level costs a run. /// [JsonPropertyName("escalationsPerUnitPerDay")] public int EscalationsPerUnitPerDay { get; set; } = 10; public TimeSpan Deadline => TimeSpan.FromHours(Math.Clamp(DeadlineHours, 0.25, 24 * 14)); }