• Aryan Noshirvani's avatar
    Fix dormant telegram_bot bug: implement init_db/log_correction · 242f03ef
    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: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01BCxXmJVvDFJVHTUi4QgNzi
    242f03ef
Name
Last commit
Last update
deploy/systemd Loading commit data...
scripts Loading commit data...
src Loading commit data...
tests Loading commit data...
.env.example Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
Dockerfile Loading commit data...
README.md Loading commit data...
docker-compose.yml Loading commit data...
requirements.txt Loading commit data...
setup.sh Loading commit data...