The database probe in api/routes/health.py executes the literal string "SELECT 1". SQLAlchemy 2.x requires textual SQL to be wrapped in sqlalchemy.text(), so the probe raises and the health check reports the database as down even when it is reachable.
Steps to reproduce: call GET /health with the stack running (or invoke the route handler in a unit test with a live session) and observe the database check failing with ArgumentError: Textual SQL expression 'SELECT 1' should be explicitly declared as text('SELECT 1').
The database probe in
api/routes/health.pyexecutes the literal string "SELECT 1". SQLAlchemy 2.x requires textual SQL to be wrapped insqlalchemy.text(), so the probe raises and the health check reports the database as down even when it is reachable.Steps to reproduce: call
GET /healthwith the stack running (or invoke the route handler in a unit test with a live session) and observe the database check failing withArgumentError: Textual SQL expression 'SELECT 1' should be explicitly declared as text('SELECT 1').