mirror of
https://github.com/Dasemu/skipredictor.git
synced 2026-11-26 15:26:15 +00:00
fix(bot): read current prediction schema
This commit is contained in:
1 parent
dabadb105b
commit
4933c61c69
2 files changed
+106
-34
No files matched your search
+11
@@ -0,0 +1,11 @@
|
||||
## Deployment Assumptions - 2026-03-12
|
||||
|
||||
**What went wrong:** I assumed the Telegram bot running on the server might differ from the repository after seeing a schema mismatch between the bot code and the predictions JSON.
|
||||
|
||||
**Root cause:** I inferred deployment drift before exhausting the simpler explanation: the repository bot itself still expected the old JSON schema and would therefore fail even when code and server were synchronized.
|
||||
|
||||
**Prevention rule:** In this repository, when the user states the server and repo are synchronized, treat that as the default assumption and first verify whether the bug is reproducible directly from the checked-in code before attributing it to deployment drift.
|
||||
|
||||
**Example:** `bot/telegram_bot.py` expected top-level station keys plus legacy fields like `station_open_probability`, while `scripts/collect_daily_data.py` writes predictions under `stations` with fields such as `open_probability` and `km_open`.
|
||||
|
||||
**Files affected:** `bot/telegram_bot.py`, `scripts/collect_daily_data.py`
|
||||
Reference in new issue
Block a user