nrml
Backend developmentAmazon

Verification Code Lifecycle

Repair challenge creation, expiry checks, and single-use profile updates.

The scenario

Repair a synthetic recovery flow with expiring verification challenges and persisted profile updates. This original exercise draws on an Amazon AI-assisted debugging report and uses no real credentials or messages.

A failure to reason about

A newly issued challenge can invalidate an earlier verification even when the visible code happens to be the same.

Illustrative context for the topic. The exercise’s full requirements arrive in the workspace.

Questions to bring to your review

  • Which challenge did a verification authorize?
  • What happens at the exact expiration boundary?
  • When is a verification consumed?
  • How do you prove the updated value was stored?

Skills you will practice

  • Temporal boundaries
  • State ownership
  • Single-use authorization
  • Persistence
  • Regression testing

Read the existing code, reproduce the reported behavior, review proposed changes, and verify your final implementation. You can use AI assistance while staying responsible for the result.

Prepare with a worked example

See how nrml evaluates an attempt, including the limits of automated evidence.