-
Aryan Noshirvani authored
src/telegram_bot/bot.py has called src.core.database.init_db() and log_correction() since before this session started - neither function existed anywhere in the codebase, not even in the original pre-reorg flat-file layout. The bot was never deployed, so this never surfaced, but it would have crashed immediately on first use. Implemented rather than just removing the calls, since they represent real intended behavior: - init_db(): idempotent wrapper around the table creation that already runs at module import time - a defensive check for the bot running as a standalone process that might start before the API ever has. - log_correction(): a new Correction model + write, recording a user's manual song-ID correction (picked from candidates, typed manually, or confirmed a Gemini guess) as a simple audit trail - what the call site's arguments (user_id, title, artist, source) clearly imply was the original intent. Co-Authored-By:
Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BCxXmJVvDFJVHTUi4QgNzi
242f03ef