mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-09-19 09:40:12 +00:00
Trim alert samples using AlertRule.RetentionWindow() (max rule duration) instead of Check()'s verdict max, which is 0 while a rule's window is still filling. The old max<=0 trim wiped history every tick, so Duration>=2 general rules never accumulated enough samples and never fired a notification. Add model + end-to-end singleton regression tests covering sample accumulation, the retention-window contract, and the actual notify path.