fix: chain morning alerts for regime Telegram delivery
Deploy / lint (push) Successful in 9s
Deploy / test (push) Successful in 1m14s
Deploy / deploy (push) Successful in 37s

Regime is computed at 02:00 ET; without a morning alert pass, quadrant
changes waited until 15:30. Dispatcher is change-driven so quiet days stay
quiet. Drop unused alerts_frequency config.
This commit is contained in:
2026-07-18 18:00:00 +02:00
parent 736451e26f
commit a71dd4adb7
4 changed files with 8 additions and 3 deletions
+1
View File
@@ -134,6 +134,7 @@ indicators.
1. **OHLCV** — latest daily bars (Alpaca); new tickers backfill ~5 years. 1. **OHLCV** — latest daily bars (Alpaca); new tickers backfill ~5 years.
2. **Sentiment** — stale names that matter (top-pick feeders, watchlist, open paper, discovery net). Display context only; the activation gate is price-only. 2. **Sentiment** — stale names that matter (top-pick feeders, watchlist, open paper, discovery net). Display context only; the activation gate is price-only.
3. **Market Regime** + **Regime Monitor** — breadth/trend and the v2 risk thermometer; feed no trades. 3. **Market Regime** + **Regime Monitor** — breadth/trend and the v2 risk thermometer; feed no trades.
4. **Telegram alerts** — change-driven (regime-quadrant etc.); quiet days stay quiet. Setup alerts still fire on the near-close pipeline after the scan.
**Near-close** (~15:30 ET MonFri) — the only full-universe qualifying observation: **Near-close** (~15:30 ET MonFri) — the only full-universe qualifying observation:
+2 -2
View File
@@ -59,8 +59,8 @@ class Settings(BaseSettings):
sentiment_fresh_hours: int = 120 sentiment_fresh_hours: int = 120
sentiment_top_composite: int = 30 sentiment_top_composite: int = 30
fundamental_fetch_frequency: str = "weekly" # quarterly-ish data; weekly conserves API quota fundamental_fetch_frequency: str = "weekly" # quarterly-ish data; weekly conserves API quota
rr_scan_frequency: str = "daily" rr_scan_frequency: str = "daily" # legacy label; qualifying scan is cron near-close
alerts_frequency: str = "hourly" # alerts_frequency removed: alerts fire only via morning + near-close pipelines
fundamental_rate_limit_retries: int = 3 fundamental_rate_limit_retries: int = 3
fundamental_rate_limit_backoff_seconds: int = 15 fundamental_rate_limit_backoff_seconds: int = 15
# Pause between tickers in the bulk fundamentals job. Free tiers throttle # Pause between tickers in the bulk fundamentals job. Free tiers throttle
+4
View File
@@ -1190,6 +1190,10 @@ _DAILY_PIPELINE_STEPS = [
("market_regime", "compute_market_regime"), ("market_regime", "compute_market_regime"),
# Observational only — display/alerts; not trade selection. # Observational only — display/alerts; not trade selection.
("regime_monitor", "compute_regime_monitor"), ("regime_monitor", "compute_regime_monitor"),
# Alerts after regime so quadrant changes reach Telegram in the morning.
# Dispatcher is change-driven; quiet days stay quiet. Setup alerts still
# fire on the near-close pipeline after the qualifying scan.
("alerts", "dispatch_alerts_job"),
] ]
# Near-close (~15:30 ET MonFri): refresh in-progress day-t bars (already how # Near-close (~15:30 ET MonFri): refresh in-progress day-t bars (already how
@@ -21,7 +21,7 @@ const FIELDS: { key: keyof ScheduleConfig; label: string; hint: string; mono?: b
{ {
key: 'schedule_daily_pipeline_cron', key: 'schedule_daily_pipeline_cron',
label: 'Morning pipeline', label: 'Morning pipeline',
hint: 'OHLCV → benchmark → sentiment → regime (no R:R scan). Default 02:00 ET.', hint: 'OHLCV → benchmark → sentiment → regime → alerts (no R:R scan). Default 02:00 ET so regime-quadrant changes hit Telegram in the morning.',
mono: true, mono: true,
}, },
{ {