Skip to content

feat(backend): make transfer creation idempotent under retries and concurrency #128

Description

@arisu6804

Problem

A client or provider retry can create duplicate transfers when the original request timed out before its response was delivered.

Objective

Deliver a production-quality improvement to transfer creation and mutation service that creates measurable value for correctness, security, reliability, performance, or maintainability.

Implementation scope

  • Require an actor-scoped idempotency key and canonical request fingerprint; persist terminal results; serialize concurrent requests and reject conflicting reuse.

Acceptance criteria

  • A retry returns the original transfer without duplicate movement; conflicting payloads fail clearly; one audit record and one provider command are produced.

Required validation

  • Concurrent request, timeout, restart, conflict, and provider-retry integration tests.
  • Existing tests and CI remain passing.
  • Add regression coverage for the original failure mode.
  • Do not weaken, delete, or skip unrelated tests to obtain a green build.

PR quality bar

  • Keep the PR focused and explain design tradeoffs, compatibility impact, and test evidence.
  • Avoid typo-only, documentation-only, cosmetic-only, or unrelated refactor submissions.

Out of scope

  • Broad rewrites not required by the acceptance criteria.
  • Changes to unrelated services, contracts, or user flows.

Metadata

Metadata

Assignees

Labels

GRANTFOX OSSOpen-source issue tracked by GrantFoxMAYBE REWARDEDThis issue may carry a rewardThird CampaignThird Campaign contributionenhancementNew feature or requestpriority:highHigh implementation priority

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions