SQLAlchemy's text() treats $1/$2 in PL/pgSQL blocks as bindparams and raises
InvalidRequestError. exec_driver_sql sends raw SQL directly to psycopg2,
bypassing that processing. Without this all tables are missing on startup.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Python FastAPI ML backend kept intact; auth replaced with central hnf_session cookie verification. Frontend rebuilt on React 18 + TS + Vite with stack design system, Plotly charts retained. Shared Postgres via DATABASE_URL; schema applied on startup.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>