nrml
Illustrative report · Example scores and feedback, not a real interview.
Interview completedSeptember 16, 2026

Repair Retry Safety in the HTTP Client

TypeScriptAI Interview45 minute limitVersion 20
82out of 100
Overall scoreEvidence from your session

Score breakdown

Points earned in each evaluation category.

Code correctness25 / 30
AI supervision21 / 25
Engineering judgment16 / 20
Testing discipline11 / 15
AI usage9 / 10

Implementation review

AI static review

A review of your submitted code. Suggested changes and examples have not been executed; this feedback does not change your score.

The retry policy separates request safety from response classification, and the backoff is deterministic with injected jitter. The stopping logic still needs a consistent rule when cancellation and the deadline coincide.

What to improve

Cancellation loses a tie with the deadlineHigh priorityCorrectnesssrc/stopping.ts:2–3
From your submission
  if (now >= deadline) return 'deadline';  if (cancelAt !== undefined && now >= cancelAt) return 'cancelled';
Why it matters
When now, deadline, and cancelAt are equal, the first branch returns deadline. The contract gives cancellation precedence at that exact boundary, so the function reports the wrong stopping reason.
Suggested change
Compare the stopping timestamps first. Choose the earlier timestamp, prefer cancellation when they are equal, and use that same decision for both transport attempts and backoff sleeps.
How to verify
Add deterministic cases for cancelAt before, equal to, and after deadline. For the equal case, assert cancelled and confirm that no new transport attempt starts.
Name the method set for the retry rule it representsLow priorityMaintainabilitysrc/policy.ts:1
From your submission
const SAFE = new Set(['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE']);
Why it matters
PUT and DELETE are repeatable under this policy, but they can change server state. Calling the set SAFE blurs that distinction for someone extending the policy.
Suggested change
Rename the set to IDEMPOTENT_METHODS or REPEATABLE_METHODS and keep the keyed-request exception in repeatable().
How to verify
Keep the method and key matrix passing: an unkeyed POST must remain non-repeatable while the listed methods remain repeatable.

One strong approach

A suggested approach to compare with your solution. Other implementations can satisfy the same requirements.

Treat retrying as a small state machine with one absolute deadline and a shared stopping rule. Keep request classification and delay calculation separate from timing transitions.

  1. Classify the request and response before deciding whether another attempt is allowed.
  2. Compute the first stopping timestamp from cancellation and the absolute deadline; use cancellation when the two timestamps tie.
  3. Check the stopping boundary before starting an attempt and across every wait. Record a delay only after its sleep completes.
  4. Advance the retry counter only when an attempt starts, and cap transport calls at maxRetries + 1.
Tradeoffs
A shared stopping helper adds a small abstraction, but keeps timing rules consistent across attempts and sleeps. Work is linear in the number of attempts, with constant timing state; retaining an attempt history uses linear space.
Illustrative code · not executed
const stoppedAt = Math.min(deadline, cancelAt ?? Infinity);
if (now >= stoppedAt) {
  return cancelAt !== undefined && cancelAt <= deadline
    ? 'cancelled'
    : 'deadline';
}

What a strong solution does

These are the behaviors the evaluation looked for. Several implementations satisfy them.

AI interviewer feedback

Feedback on your explanations and technical decisions. This does not change your code score.

Reviewed 9 of 11 candidate answers across the full transcript.

Interview transcript (4 messages)

Voice answers appear as text. Audio recordings and camera images are not saved.

AI interviewer

Which requests in this client are safe to retry, and how do you decide?

You

A 503 tells me the server failed, not that resending is safe. The method and the idempotency key decide that.

AI interviewer

The assistant suggested restarting the timeout per attempt. What happened?

You

That turns a 2 second budget into 2 seconds per attempt. I kept one absolute deadline and measured the sleeps against it.

Interviewer feedback

Strong instinct on idempotency, and you pushed back on the assistant with a reason rather than a preference. Next time, write the failing test before you accept the timing change.

Priya Raman · September 16, 2026

Practice patterns over time

Compare the latest five observations with the five before them. Counts show the evidence available; a missing earlier period stays blank.

Skills practiced

Average interview score for problems tagged with this skill. These are practice outcomes, not isolated skill assessments.

Problem skillRecentEarlierChange
Retries82/1005 observations74/1005 earlier+8 points
Deadlines77/1004 observations71/1003 earlier+6 points
Idempotency80/1002 observationsNo earlier observations
AI mistake responses

Percentage of calibrated mistakes rejected or corrected with verification. Historical outcomes with missing or low confidence are excluded. A rejection alone does not prove its reasoning was correct.

Mistake typeRecentEarlierChange
Retry non-idempotent operation80%5 observations60%5 earlier+20 pp
Ignore deadline67%3 observations50%4 earlier+17 pp

Recommended problems

Focus your next session on the areas your recent work can strengthen.

Explore all problems

Get your own interview report

Submit a problem for evaluation to receive scores and specific feedback.

Get your first report