Rust SDK: implement admin.dlq.list() / admin.dlq.requeue(id) with test coverage#773
Merged
Mac-5 merged 2 commits intoJun 30, 2026
Conversation
…ests Adds DLQ (dead-letter queue) support to the AdminSynapseClient: - admin.dlq.list() wraps GET /dlq and returns all failed transaction entries - admin.dlq.requeue(id) wraps POST /dlq/:id/requeue and explicitly converts 404 responses to SynapseError::NotFound so missing IDs never surface as a silent success or a generic 500 - Includes unit tests (wiremock) covering both happy paths, the not-found edge case, and verifying that X-Admin-Key (not X-API-Key) is sent Closes Synapse-bridgez#760 Closes Synapse-bridgez#761
|
@coredevdave-cmd Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
webhook_replay (Synapse-bridgez#762): - AdminWebhookReplay resource: list_failed(filters), replay(id, dry_run), replay_batch(ids, dry_run) - list_failed accepts optional filters: limit, offset, asset_code, from_date, to_date (matches ListFailedWebhooksQuery in the handler) - replay_batch explicitly documents and tests that callers must inspect each WebhookReplayResult entry — HTTP 200 does not mean all items succeeded - 8 wiremock unit tests covering happy paths for all three methods, per-item result inspection in batch, admin-key enforcement, dry-run mode, and filter passthrough - Wires webhook_replay() accessor onto AdminSynapseClient OpenAPI spec (Synapse-bridgez#718): - docs/openapi.yaml covers every endpoint wrapped by the SDK and CLI: transactions (list, get, search, export), settlements (list, get), stats (status, daily, assets, cache), health (health/live/ready), GraphQL, WebSocket message envelope, and all admin endpoints (DLQ, webhook replay, locks, settlements, reconciliation, bulk-status) - Each operation has a summary, request params, and response schema with example values Closes Synapse-bridgez#762 Closes Synapse-bridgez#718
3b129d3 to
f597e46
Compare
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
AdminDlqresource to the Rust SDK undersdks/rust/src/resources/admin/dlq.rsadmin.dlq.list()→GET /dlq: returns all dead-letter queue entries ordered bymoved_to_dlq_atdescadmin.dlq.requeue(id)→POST /dlq/:id/requeue: replays a failed transaction; 404 responses are explicitly mapped toSynapseError::NotFound(never silent success or a generic 500)DlqEntry,DlqListResponse, andRequeueResponsemodels tomodels.rsdlq()accessor ontoAdminSynapseClientinclient.rsAdminDlqfromresources/admin/mod.rsTest plan
All tests are in
sdks/rust/src/resources/admin/dlq.rsusing wiremock (no live server):list_returns_dlq_entries_on_200— happy path forlist()list_returns_empty_list_when_dlq_is_clear— empty DLQ returnsOkwith emptyVec, not an errorlist_uses_admin_key_not_public_key— mock requiresX-Admin-Key; passes only when admin key is sentrequeue_returns_success_on_200— happy path forrequeue(id)requeue_uses_admin_key_not_public_key— mock requiresX-Admin-Key; passes only when admin key is sentCloses #760
Closes #761
Closes #762
Closes #718