feat(simple_metrics): model-level, window-aware threshold breach alert (SIENTIAPDE-2189)

This commit is contained in:
PedroHMCosme
2026-10-07 15:18:35 -03:00
parent 196b1aa708
commit 9c89cfbf8e
2 changed files with 13 additions and 5 deletions

View File

@@ -1074,6 +1074,10 @@ def test_calculate_simple_metrics_threshold_breach_rmse(model_metrics_activity):
assert call_kwargs['notification_id'] == 'SIMPLE_METRICS_THRESHOLD_BREACH'
assert call_kwargs['level'] == NotificationLevel.WARNING
assert 'rmse' in call_kwargs['message']
assert '(window 5 min)' in call_kwargs['message']
# Model-level trigger so the orchestrator dedup merges windows (spec decision 9).
assert call_kwargs['metadata']['schedule_name'] == 'test_model_id-simple_metrics'
assert call_kwargs['metadata']['model_name'] == 'test_model'
def test_calculate_simple_metrics_threshold_no_breach(model_metrics_activity):