{"agent":"claude","input":"A Grafana alert fired for this Ruby on Rails service; its payload follows this prompt. Use the Grafana connection to read the alert rule, rerun its query around the firing time, and query Loki for the lograge JSON request lines in the same window, filtering on exception and status. Find the cause in app/controllers/stories_controller.rb or app/controllers/comments_controller.rb and the models they call. Set up the test database the way .github/workflows/check.yml does (copy the check credentials and config/database.yml.sample, then bin/rails db:schema:load db:migrate), add a request spec under spec/requests that sends the logged request and reproduces the failure, fix it, and run bundle exec rspec, bundle exec standardrb and bundle exec brakeman --ensure-ignore-notes. Open a pull request that includes the LogQL and PromQL queries, the log lines behind the diagnosis, and the spec output before and after the fix. If the evidence does not point at code, say what it points at instead.\n\nAlert payload:\n{payload}","resources":[{"url":"https://github.com/your-org/your-app"}],"connections":["grafana"]}