{"agent":"claude","input":"Add rate limiting to the login and signup routes of this Express app and open a pull request. Read package.json, server.js, config/config.js, config/env/all.js, app/routes/index.js, app/routes/session.js, app/views/login.html, Gruntfile.js, Dockerfile and .github/workflows first. Add express-rate-limit, choosing a major whose engines field supports the Node versions in the Dockerfile and the workflow matrix. Write app/middleware/rate-limit.js exporting loginLimiter and signupLimiter built from loginRateLimit and signupRateLimit objects (windowMs, max) that you add to config/env/all.js; key on req.ip and do not set trust proxy, but say in the pull request what to set behind a proxy. When a request is blocked, render the same login or signup view with the error string the view already shows, keeping the 429 status and Retry-After header. Apply the limiters only to POST /login and POST /signup in app/routes/index.js. Add test/unit/rate-limit-test.js with mocha and should, since Gruntfile.js runs mochaTest:unit over test/unit and that directory is empty: cover the block after max attempts from one address, the Retry-After header, and a second address getting through. Run npm test and grunt precommit, start the server and include a curl -i exchange showing the 429 in the pull request. Do not change the session or authentication code.","resources":[{"url":"https://github.com/your-org/your-app"}]}