Skip to content

Issue 100 idempotency tests#195

Merged
Mac-5 merged 2 commits intoSynapse-bridgez:developfrom
jhayniffy:issue-100-idempotency-tests
Feb 26, 2026
Merged

Issue 100 idempotency tests#195
Mac-5 merged 2 commits intoSynapse-bridgez:developfrom
jhayniffy:issue-100-idempotency-tests

Conversation

@jhayniffy
Copy link
Copy Markdown
Contributor

This PR introduces comprehensive integration tests to validate idempotency behavior across critical endpoints. The tests ensure repeated requests with the same idempotency key produce consistent responses without unintended side effects.closes #194

Mac-5 and others added 2 commits February 26, 2026 04:54
Documented changes made to CI/CD processes, including code formatting, migration fixes, and clippy fixes. Listed remaining issues and next steps for further improvements.
- Implement full Redis-based idempotency logic in middleware
- Add 8 comprehensive integration tests covering all requirements:
  * Duplicate request detection and cached response return
  * Concurrent request handling with 429 responses
  * TTL expiration and key cleanup
  * Cached response matching original
  * Different payload rejection with same key
  * Redis failure fallback (fail-open strategy)
  * No idempotency key pass-through
  * Valid idempotency key format handling

- Fix never type fallback warnings with explicit type annotations
- Add detailed test documentation in tests/README_IDEMPOTENCY.md
- Tests verify behavior via Redis state inspection
- All tests pass when Redis is available (1 passes without Redis)

Resolves Synapse-bridgez#100
@Mac-5 Mac-5 self-requested a review February 26, 2026 12:49
@Mac-5 Mac-5 merged commit 15f805d into Synapse-bridgez:develop Feb 26, 2026
1 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants