From 9f21372ab313a20d26c12c4dc73775787be01f70 Mon Sep 17 00:00:00 2001 From: PedroHMCosme Date: Thu, 8 Oct 2026 08:43:45 -0300 Subject: [PATCH] docs: floor warning fires on each schedule create/update; unparseable frequency_alert is ignored (SIENTIAPDE-2193) --- README.md | 2 +- orchestrator/activities/formatters.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b0e3973..a0d7666 100644 --- a/README.md +++ b/README.md @@ -630,7 +630,7 @@ One `pipelines` doc per window, all with the same `model_id`. Name them ` | Field | Meaning | Default | |---|---|---| -| `frequency_alert` | Frequency while escalated, same format as `frequency`. Absent = adaptive mode off. Below `1m` (or unparseable), the orchestrator sends a WARNING each time it creates or updates the schedule, and keeps the value | — | +| `frequency_alert` | Frequency while escalated, same format as `frequency`. Absent = adaptive mode off. Below `1m` (or unparseable), the orchestrator sends a WARNING each time it creates or updates the schedule. A value below `1m` is kept; an unparseable value is ignored (the schedule keeps `frequency`) | — | | `adaptive_state` | `{escalated, healthy_streak}`, written **only** by laborious (with `updated_at` as a BSON datetime when `escalated` flips) | `{false, 0}` | | `model.model_config.simple_metrics_thresholds` | `{_max, _min}` shared by all windows | — | | `model.model_config.simple_metrics_min_samples` | Windows with fewer rows neither alert nor escalate, and count toward recovery | — | diff --git a/orchestrator/activities/formatters.py b/orchestrator/activities/formatters.py index 41378eb..17a8187 100644 --- a/orchestrator/activities/formatters.py +++ b/orchestrator/activities/formatters.py @@ -371,7 +371,7 @@ class Formatters(SientiaMonitoring): configuration to determine which schedules need to be created, updated, or deleted. Uses timestamp comparison to identify schedules that have changed. Also sends a SIMPLE_METRICS_FREQUENCY_ALERT_BELOW_FLOOR WARNING for laborious schedules - whose frequency_alert is below 1m or unparseable (the value is kept). + whose frequency_alert is below 1m (the value is kept) or unparseable (it is ignored). Args: input_data (dict[str, Any]): The input data containing: @@ -412,7 +412,8 @@ class Formatters(SientiaMonitoring): schedules, current_schedules, to_update, to_create, namespace, metadata ) - # Only schedules being created/updated: fires on each config change (including escalation flips), not every tick. + # Fires whenever the schedule is created or updated (each `updated_at` change, + # including escalation flips). changed = {**to_create[self.laborious_namespace], **to_update[self.laborious_namespace]} for schedule_name, schedule in changed.items(): warning = frequency_alert_warning(schedule.get('frequency_alert'))