GitHub only

Fix a production error

Checkout is returning 500 errors. Devin reproduces them by replaying production traffic locally, finds the cause in the logs, and opens a fix PR with a regression test. If you use Sentry, it can start from the live Sentry issue instead.

Needs
GitHub
Starter
devin-demo-sentry-incident

Steps

  1. Enter your GitHub user or org. The links and the prompt on this page use it.
  2. Create your own copy of the starter repo. Open GitHub's new-repository page for devin-demo-sentry-incident, choose your account as the owner, keep the name devin-demo-sentry-incident, and click Create repository.
  3. Make sure Devin can access the new repo under Settings → Connections → GitHub.
  4. Start a session at app.devin.ai and paste the prompt below.

Prompt

It's 3am and checkout is throwing 500s in production. You're on call.

Clone https://github.com/<you>/devin-demo-sentry-incident, start the server, and reproduce the failure with `npm run traffic` (it replays a slice of production checkout traffic against the local server). Use the server logs and stack trace to find the root cause, then ship a PR with the fix plus a regression test that fails before and passes after. In the PR, include the blast radius (which carts/codes are affected) and a short incident summary.

What to watch

  • Devin starts the server and replays the traffic itself, so you don't need to run anything on your machine.
  • The regression test fails before the fix and passes after it.

You're done when

  • The PR explains the root cause and includes the blast radius and an incident summary.
  • The new regression test passes.

Optional: start from Sentry

If you use Sentry, Devin can read the live issue (stack trace, breadcrumbs, event count) instead of finding the error in the logs, and comment the PR link back on the issue.

  1. Create a free Sentry project (Node.js) and copy its DSN.
  2. Clone your copy and start it with your DSN: git clone https://github.com/<you>/devin-demo-sentry-incident && cd devin-demo-sentry-incident && npm install && SENTRY_DSN=<your-dsn> npm start
  3. In a second terminal in the same folder, run npm run traffic two or three times. Sentry should now show an unresolved TypeError.
  4. In Devin, open Customize → Browse marketplace, install Sentry, then click Connect under Customize → MCPs.
  5. Enter your Sentry organization and project slugs, which appear in the project URL in Sentry.
  6. Start a session at app.devin.ai and paste this prompt instead of the one above.
It's 3am and checkout is throwing 500s in production. You're on call.

Use the Sentry MCP (org <your-sentry-org>, project <your-sentry-project>) to pull the top unresolved issue, its stack trace, and event breadcrumbs/tags. Then clone https://github.com/<you>/devin-demo-sentry-incident, reproduce the failure locally (`npm run traffic` replays production carts against a local server), find the root cause, and ship a PR with the fix plus a regression test that fails before and passes after. In the PR, include the Sentry issue ID, blast radius (which carts/codes are affected), and a short incident summary. Do not resolve the Sentry issue until the PR is up; then comment on it with the PR link.
Next labTriage a bug report from Slack