Commit 242f03ef authored by Aryan Noshirvani's avatar Aryan Noshirvani

Fix dormant telegram_bot bug: implement init_db/log_correction

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: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BCxXmJVvDFJVHTUi4QgNzi
parent b2ed559a
Pipeline #1000 passed with stage
in 10 minutes and 15 seconds