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.
Hands-on debugging
4 h
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
- Webhooks arrive at least once
- One deadline per delivery
- A timed-out send is an unknown outcome
- Record progress after the effect
- Reproduce before you fix
- Incident: duplicate and missing replies
- Handler contract and incident replay
- Diagnose the handler
- Predict the fixed replay
- Fix the reply sender
- Minimal fixes or a new structure
- Declare the release check before deploy
- Declare the release check
Hard questions are part of Premium: the study guide, reference answer, rubric, and exercises unlock with Premium.
Related on CodeSnatch
Lessons, problems, and articles that build the skills this question uses.
System Design
Stores idempotency keys with a request hash and reconciles a provider call whose result was lost to a timeout.
System Design
At-least-once delivery and idempotent consumers, the same delivery guarantee a webhook receiver lives with.
AI Engineering
Another partial failure to debug from logs and code, ending in a cutover gate declared before results are read.
Community article
A practitioner's receiver checklist: signatures, deduplication, idempotent effects, and event ordering.
Community article
Covers key storage, body fingerprints, concurrent retries, and expiry windows, the details that decide if a resend is safe.
Practice the interview question
Answer it in your own words before you look at the reference answer.
