{"agent":"claude","input":"After raising SQLAlchemy to 2.x this app fails with \"Textual SQL expression 'SELECT 1' should be explicitly declared as text('SELECT 1')\", or with an AssertionError or ObjectNotExecutableError at startup. Read the requirements files and report the pinned versions of SQLAlchemy, Flask-SQLAlchemy, Flask and Alembic, and which of them must move together for SQLAlchemy 2 to install and import. Search the whole repository for calls to execute() on a session, connection or engine, and for each one say whether the argument is a plain string, a string built by formatting, or already a text() or Core construct. Wrap plain strings in sqlalchemy.text(). Where a string is built with %, .format or an f-string, rewrite it to use bound parameters and pass the values separately. Check any code that catches SQLAlchemyError around such a call and then asserts or returns False, because that hides this error behind another one; make the real message visible. Make the text() changes in a first commit that still passes on the currently pinned versions. In a second commit raise the pins to a compatible set, fix whatever else breaks (engine.execute, removed attributes, extension APIs) and list each fix. Run the test suite before and after each commit and include the output. If the tests need a database, use the SQLite configuration the tests already define; do not connect to any real database. Open a pull request with both commits and say which one is safe to merge alone.","resources":[{"url":"https://github.com/your-org/your-app"}]}