• Aryan Noshirvani's avatar
    Fix real bug: os.rename fails cross-filesystem (found via new test) · d8391794
    Aryan Noshirvani authored
    The actual root cause of the CI-only 500, once the diagnostic from the
    last commit surfaced it: [Errno 18] Invalid cross-device link. This
    was never an environment/ffmpeg issue - it's a genuine pre-existing
    bug in tag_and_convert_audio. os.rename() (the rename(2) syscall)
    cannot move a file across filesystems/mounts; it only happened to work
    on this dev VPS because /root/antigrav-stax-audio/temp and the app's
    working directory share one partition. In CI, the build's working
    directory is a separate volume from /root, so the exact same code
    path fails every time. /music/upload's success path had zero test
    coverage before this session, so nothing had ever actually exercised
    this rename in an environment where it could fail.
    
    Fixed with shutil.move(), which transparently falls back to copy+delete
    when the destination isn't on the same filesystem - correct regardless
    of deployment topology, not just this one VPS's current partition
    layout.
    Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01BCxXmJVvDFJVHTUi4QgNzi
    d8391794
Name
Last commit
Last update
..
api Loading commit data...
core Loading commit data...
services Loading commit data...
telegram_bot Loading commit data...
telegram_worker Loading commit data...