Repository navigation
test(backend): cover remittance retry after downstream failure (#2101) - #2210
Merged
K1NGD4VID merged 1 commit intoOct 29, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds route-level coverage proving a remittance request can be retried with the same idempotency key after a downstream failure, without replaying or caching the 5xx response.
Linked issue
Closes #2101
Changes
Screenshots / Demo
Not applicable for this backend-only test change. Verification output:
Implementation notes
Uses the existing Jest/Supertest route harness and mocked remittance service/cache. No production code changes are needed: the test locks in the existing contract that 5xx responses are not cached and the in-flight reservation is released.
Testing
cd backend && npm test -- --runInBand src/__tests__/remittanceIdempotency.test.ts src/__tests__/remittanceRoutes.test.ts- passed (16 tests).cd backend && npm run typecheck- passed.cd backend && npm run build- passed.cd backend && npm run lint- passed with 43 existing warnings; no warnings in the edited test.Acceptance criteria
Checklist
Notes for reviewers
CI checks will run on the pull request.