{"agent":"claude","input":"Add connection pool settings to this Flask and SQLAlchemy app. Read config.py, app/__init__.py, app/tasks.py, boot.sh, Dockerfile, requirements.txt and tests.py first. Add SQLALCHEMY_ENGINE_OPTIONS to Config built from the database URI: for postgresql and mysql set pool_pre_ping and read pool_size, max_overflow, pool_timeout and pool_recycle from environment variables, keeping SQLAlchemy's defaults when they are unset; leave sqlite with no pool options so tests.py keeps working. Install PostgreSQL in the sandbox, run flask db upgrade, start the app, create a user through POST /api/users, terminate that server-side connection with pg_terminate_backend, and repeat the request with and without pool_pre_ping, quoting both responses and the log lines. Run python tests.py. Open a pull request.","resources":[{"url":"https://github.com/your-org/your-app"}]}