Save once, even when retried
Make repeated actions safe with idempotency.
16 minutes
Repeated requests are normal
A learner can double-click, retry after a timeout or use two tabs. If completion creates a fresh event every time without a deduplication rule, points and counts may inflate. The user’s intention is usually one completion, not two.
Choose the stable identity
Use the user-and-lesson pair to upsert current progress. If retaining an event history, give each intended action an identifier and enforce uniqueness. Distinguish a repeated request from a genuinely new attempt.