Our manually-added lower-week Saturday entry (missing from PR #39/#40
upstream) still had the old "Новосёлова" spelling; PR #40 fixed it to
"Новохатько" everywhere else but couldn't touch an entry that didn't
exist in its diff.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Resolve config.py conflict by taking Danil's PR #39 schedule content
(teacher names/rooms, per-week Thursday split) as the source of truth,
per explicit user decision, with two fixes on top:
- UPPER_WEEK_IS_ODD restored to False (current ISO-even week is upper,
confirmed by the user)
- added the missing Saturday entry under LESSON_SCHEDULE["lower"]
(PR #39 only defined it under "upper", which would have silently
dropped the Saturday philosophy lecture on lower weeks)
The old SCHEDULE dict was hand-written for a previous timetable and
never got updated when LESSON_SCHEDULE changed, so Wednesday (day=2)
was left empty ("Сегодня кайфуем дома, перекур не нужен") even though
the new schedule has 4 lessons that day. SCHEDULE is now generated
from the pairs actually present in _LESSON_WEEK plus PAIR_TIMES, so it
can't drift out of sync again.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Primary model errors (HTTP 4xx/5xx, connection failures) raised out of
_call_llm uncaught, skipping the fallback branch entirely — fallback
only ran when the primary returned an empty/"can't answer" string.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Current week (36, even) is actually an upper week per the user, not
lower as the old flag implied.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace placeholder LESSON_SCHEDULE with actual timetable from
schedule_2_27.json (25ВТ-09.03.03.01-о2), incl. subgroup splits on
Wed/Thu and a Saturday entry.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Все 4 SQLite базы объединены в одну PostgreSQL
- Новый db.py с ThreadedConnectionPool (psycopg2)
- docker-compose: сервис postgres с healthcheck, данные в ./db/postgres
- scripts/migrate_sqlite_to_pg.py — миграция существующих данных
- Убраны мёртвый код и дублирующий import в main.py и talk_handler.py
- .env удалён из git-индекса
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- penis_stats переехал в economy.sqlite3, длина хранится в user_balances.balance
- /top_penis читает из user_balances, /penis пишет туда же
- create_deposit: деньги уходят в капитал ЦБ
- create_loan: деньги берутся из капитала ЦБ
- repay_loan: деньги возвращаются в ЦБ
- добавлен process_matured_deposits: ЦБ выплачивает вклады с процентами
- init_penis_db() больше не вызывается
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- economy_background_tasks() была вставлена в середину main(), из-за чего
dp.startup.register и asyncio.run(dp.start_polling) оказались мёртвым кодом
внутри while True — бот никогда не поднимался
- двойной fetchone() в get_user_stats (тот же баг что в PR #34, но в другом месте)
- conn.close() вызывался до запросов за активностью, потом ещё раз — ProgrammingError
- handle_central_bank_cmd строил текст но не делал await message.answer()
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Удалена дублирующая функция handle_uwu_cmd в uwu.py (мёртвый код)
- Исправлен краш UnboundLocalError в /zvetok (next_dt и delta могли быть не определены)
- Баланс penis больше не уходит в минус при проигрыше в казино
- talk_handler теперь использует путь БД из config.py вместо своего (разные файлы БД)
- betting.py больше не крашится при импорте если /db/ недоступен
- Таймаут гадания снижен со 120 до 30 секунд (Telegram таймаутит раньше)