• Aryan Noshirvnai's avatar
    Harden backend, add permanent identification cache, self-bootstrapping deploy · 92a8a0e4
    Aryan Noshirvnai authored
    - Extract auth/storage into src/core/security.py and src/services/storage.py,
      scope library/discovery/social routes to the authenticated user
    - Add IdentifiedTrack cache table keyed by audio fingerprint so repeat uploads
      of the same song skip Shazam/AcoustID/Gemini identification entirely;
      enable sqlite WAL mode so cache reads don't stall behind unrelated writes
    - Add Alembic migrations (baseline schema + identified_tracks)
    - Add pytest-mock to requirements.txt - was missing despite being used
      throughout the existing test suite via the mocker fixture
    - Rewrite deploy/scripts/deploy.sh to self-bootstrap a bare prod server
      (system packages, repo clone, venv, .env from CI-supplied secrets,
      systemd unit sync) and restart services on every deploy
    - Add .gitlab-ci.yml: test stage runs on dev/main pushes, deploy_prod runs
      only on main and SSHes into prod to trigger deploy.sh
    Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
    92a8a0e4
99b0833a4bd2_baseline_schema.py 11.6 KB