AI Engineering
/
Production & Reliability
/

Debug an integration with partial failures and retries

Production & Reliability · 3 to 4 hours

Debug an integration with partial failures and retries

Find why an SMS reply webhook sent duplicate texts, left some messages unanswered, and multiplied model calls under rate limits, timeouts, and redeliveries. Fix each defect with a regression test, then declare the release check for the fix.

Hard
Hands-on

Hands-on debugging

4 h

Premium

Overview

Debug a webhook handler that sent duplicate texts, left messages unanswered, and multiplied model calls when its providers slowed down and rate-limited it. You will reproduce each failure with scripted responses and a fake clock, fix each defect with a regression test, and declare the release check for the fix. Writing the retry rule itself and designing agent side effects have their own questions.

Study time: 3 to 4 hours

Interview format: Live debugging against scripted provider failures, then a release check for the fix

By the end you can

  • Attribute each symptom of a partial-failure incident to its defect using handler logs, provider records, and code
  • Reproduce timeouts, rate limits, and redeliveries deterministically with a fake clock and scripted provider responses
  • Fix each defect with the smallest change and leave a regression test that fails on the old code
  • Explain when a retried side effect is safe: unknown outcomes, stable idempotency keys, payloads, and key windows
  • Predict how fixes interact, including a defect that another one hides
  • Declare a release check with per-message signals, thresholds, and rollback triggers before deploying

Prerequisites

Helpful background: Comfort reading asynchronous TypeScript or Python, HTTP status codes, and how webhooks are delivered helps.

This topic runs the application. Evaluation & Observability measures its quality, and Model Serving & Inference covers the runtime underneath.

In this guide

  1. Webhooks arrive at least once
  2. One deadline per delivery
  3. A timed-out send is an unknown outcome
  4. Record progress after the effect
  5. Reproduce before you fix
  6. Incident: duplicate and missing replies
  7. Handler contract and incident replay
  8. Diagnose the handler
  9. Predict the fixed replay
  10. Fix the reply sender
  11. Minimal fixes or a new structure
  12. Declare the release check before deploy
  13. Declare the release check

Hard questions are part of Premium: the study guide, reference answer, rubric, and exercises unlock with Premium.

Practice the interview question

Answer it in your own words before you look at the reference answer.