feat: Telegram alert on regime quadrant change (hysteresis + cooldown)
Deploy / lint (push) Successful in 6s
Deploy / test (push) Successful in 41s
Deploy / deploy (push) Successful in 27s

Fires once when the regime monitor shifts quadrant (regime index x early
warning), so you don't have to watch the tab. Two guards against spam:

- Hysteresis: each axis only flips once the value crosses its divider by a
  margin, so a point parked on a boundary keeps its quadrant instead of
  flip-flopping day to day.
- Cooldown: a genuine change stays quiet for a few days after the last alert.

Seeds the baseline silently on first run; reuses the existing Telegram dispatch
+ AlertLog. New per-trigger toggle in Admin → Alerts (on by default).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-26 19:05:01 +02:00
parent e683513857
commit 65dd53baa3
5 changed files with 161 additions and 2 deletions
+1
View File
@@ -98,3 +98,4 @@ class AlertConfigUpdate(BaseModel):
sr_proximity_enabled: bool | None = None
score_drop_enabled: bool | None = None
digest_enabled: bool | None = None
regime_quadrant_enabled: bool | None = None