Wire the Lottoland fallback into the automated update workflow

AutoUpdateAndLearn.update_data() called LottoAPIUpdater with
api_name='github', which skipped the already-implemented Lottoland ->
GitHub -> lottoAPI fallback chain entirely. The GitHub archive alone
has repeatedly lagged 1-6 days behind actual draws (most recently the
Aug 5 draw, still missing as of Aug 7), causing tips to be generated
and models to be retrained on stale data. Switching to api_name='all'
tries Lottoland first, which has consistently had same-day results in
testing, with GitHub still covering full history/fallback.

Also includes the Aug 5 draw pulled in via this fix and the resulting
model retrain (data update was previously interrupted by a truncated
pipe during manual testing, this completes it).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-07 10:55:17 +02:00
co-authored by Claude Sonnet 5
parent 79c4c0d4b3
commit a45092b162
7 changed files with 25 additions and 13 deletions
+1 -6
View File
@@ -63,7 +63,7 @@ Alle Pfade relativ zum Projekt-Root.
| Komponente | Datei | Rolle |
| --- | --- | --- |
| `LottoAPIUpdater` | `scripts/utils/update_from_api.py` | Holt neue Ziehungen. Unterstützt 3 Quellen (Lottoland, GitHub-Archiv, lottoAPI) über `fetch_from_all_apis()`, **aber** `auto_update_and_learn.py` ruft aktuell fest `api_name='github'` auf — Lottoland/lottoAPI-Fallback ist im Code vorhanden, aber nicht verdrahtet (siehe Abschnitt 5). |
| `LottoAPIUpdater` | `scripts/utils/update_from_api.py` | Holt neue Ziehungen über `fetch_from_all_apis()`: Lottoland zuerst (liefert die neueste Ziehung meist noch am Ziehungstag), GitHub-Archiv für die Historie/als Fallback (kann tagelang hinterherhinken). `auto_update_and_learn.py` nutzt seit August 2026 `api_name='all'`, davor fest `api_name='github'` — daher wiederholt verspätete Ziehungen in der Vergangenheit. |
| `AutoUpdateAndLearn` | `scripts/automation/auto_update_and_learn.py` | Orchestriert den 4-Schritte-Workflow: Daten aktualisieren → neue Ziehung prüfen → letzte Tipps evaluieren → Learning-Update (Retraining). |
| `FeatureEngineer` | `scripts/generators/ultimate_ai_ml_hybrid_generator.py` | Baut 20 Features (Frequenzen, Gaps, Momentum, Trends, Beziehungen, Zyklen) aus den Rohdaten. |
| `AIMLEngine` | `scripts/generators/ultimate_ai_ml_hybrid_generator.py` | RandomForest-Modelle, ein Modell pro Zahl (149). Cached unter `data/ultimate_ml_models/`. |
@@ -132,11 +132,6 @@ Logs: `logs/update_stdout.log` (Update+Learning), `logs/stdout.log`
## 5. Bekannte Schwachstellen / offene Punkte
- **Ungenutzter Fallback:** `LottoAPIUpdater.fetch_from_all_apis()` unterstützt
Lottoland → GitHub → lottoAPI als Fallback-Kette, aber
`AutoUpdateAndLearn.update_data()` ruft fest `api_name='github'` auf. Bei
Verzögerungen der GitHub-Quelle (schon mehrfach vorgekommen) hinkt die
Pipeline entsprechend hinterher, obwohl Lottoland oft schneller aktuell ist.
- **`update_from_web.py`** (lotto.de-Scraper) ist als dritter Fallback
implementiert, aber nirgends in der automatisierten Pipeline eingebunden.
- **Utility-Skripte** in `scripts/utils/` (`health_check.py`, `validate_csv.py`,