Test idempotency keys after their retention window closes

Check duplicate requests just before and after a server forgets a key.

Test idempotency keys after their retention window closes
WORK_LANE / FIELD GUIDE / QUALITYREVIEW QUEUEACCEPTANCEPASSowner review requiredEVIDENCE TRAILTICKET → BRANCH → REVIEW → CLIENT RELEASE
On this page
  1. Quick read
  2. Readiness check
  3. Reproduce the idempotency-key retention failure safely
  4. Leave enough evidence for a second person
  5. Role brief
  6. Frequently asked questions
  7. Sources

Is the handoff ready?

Use these checks before access expands or the first ticket begins.

Question

Ready: One observable idempotency-key retention outcome

Needs work: A request to inspect the whole system

Fixture

Ready: a sandbox endpoint with inert transactions and fixed request bodies

Needs work: Customer data or shared credentials

Evidence

Ready: key hash, request hash, response, retry time, resource ID, and expiry rule

Needs work: A pass label without observed values

Approval

Ready: The API owner approves retention, conflict behavior, and production changes.

Needs work: The contractor changes production alone

Reproduce the idempotency-key retention failure safely

A late retry can create a second resource after the original key expires. Start with one case that can fail without touching customer records or production infrastructure. Write the expected result, stop condition, and reviewer beside the fixture.

Use a sandbox endpoint with inert transactions and fixed request bodies. Label every identity and artifact so a reviewer can distinguish test evidence from a live record.

Leave enough evidence for a second person

Capture key hash, request hash, response, retry time, resource ID, and expiry rule. Include the source revision and test time. If behavior changes between runs, retain both results.

The API owner approves retention, conflict behavior, and production changes. A remote programmer can prepare the fixture, run bounded checks, and explain the result. New policy, privileged access, and release approval stay with the named owner.

Put the operating agreement in writing.

Assignment

Test one bounded idempotency-key retention case against written acceptance rules.

Fixture

a sandbox endpoint with inert transactions and fixed request bodies

Evidence

Record key hash, request hash, response, retry time, resource ID, and expiry rule.

Owner decision

The API owner approves retention, conflict behavior, and production changes.

Frequently asked questions

What should the first run prove?

It should show the expected idempotency-key retention result for one controlled fixture.

What belongs in the handoff?

Include key hash, request hash, response, retry time, resource ID, and expiry rule, the source revision, and any untested condition.

Who approves a production change?

The API owner approves retention, conflict behavior, and production changes.

Sources

  1. NIST Secure Software Development Framework

    NIST guidance for managing software development risk.

  2. GitHub pull request reviews

    First-party documentation for review and approval.

Build a programming lane your technical owner can review.

Bring the stack, backlog, acceptance checks, and release boundaries. We will help scope the role around the work.

Discuss your programming needs