{"agent":"claude","input":"This Flask API fails after a dependency update: every authenticated route answers 401 'token is invalid or expired' and POST /v1/authenticate answers 500. Read requirements.txt and report the PyJWT pin. In a clean virtual environment install the current PyJWT and reproduce both failures by calling jwt.encode and jwt.decode the way the helper module does, keeping the tracebacks. Find every jwt.decode call without an algorithms argument and every .decode() applied to the result of jwt.encode, with file and line, and fix them: pass algorithms=['HS256'] (or whatever algorithm the encode uses), set the algorithm explicitly on encode, and drop the .decode('UTF-8'). Narrow any bare except around jwt.decode to jwt's own exceptions. Update the PyJWT pin to a 2.x release. Run the app against SQLite in the sandbox by overriding the database URI through an environment variable for the test only, create a user, obtain a token through the authenticate route, call a protected route with it, and add a case with a tampered token that must get 401. Do not change how the secret key is generated, but describe its length and lifetime in the pull request. Open a pull request with both tracebacks, the changed lines, and the test output.","resources":[{"url":"https://github.com/your-org/your-app"}]}