feat: resolve issues #209 #210 #211 #212 - #344
Merged
misrasamuelisiguzor-oss merged 1 commit intoAug 25, 2026
Merged
Conversation
…ACK#212 Issue WHEELBACK#212 — cache treasury balances endpoint - Add in-memory 5-second TTL cache to GET /api/treasury/balances - Invalidate cache immediately after execute-settlement succeeds - Export getBalanceCache/setBalanceCache/invalidateBalanceCache for tests - Add treasury-balances-cache.test.ts: cache helpers, TTL expiry, cache hit/miss on HTTP layer, invalidation after mutation Issue WHEELBACK#211 — integration tests for compliance allow/block endpoints - Add compliance.test.ts with callComplianceOp unit tests: allow, block, allow_address_until, simulation error (422), send error (422), confirmation timeout (504) - HTTP-layer tests for POST /compliance/allow and /compliance/block: 401 missing/wrong admin key, 400 invalid/missing address, 400 bad 'until' value, 503 missing env vars Issue WHEELBACK#210 — harden MongoDB connection error handling and pooling - Add explicit pool config to MongoClient: maxPoolSize=10, minPoolSize=2, serverSelectionTimeoutMS=5000, connectTimeoutMS=10000, socketTimeoutMS=45000 - Wrap client.connect() in try/catch: MongoServerSelectionError produces a clear message with the URI and status 503 - Add 'error'/'close' event handlers to log topology failures - Add _resetMongoSingleton() export for test isolation - Add mongo-hardening.test.ts: 503 on unreachable host, URI in error message, non-selection error wrapping, success path, HTTP route returns 5xx on outage (not a hang) Issue WHEELBACK#209 — Redis reconnect backoff for event indexer - Add createRedisClient() with ioredis retryStrategy implementing capped exponential backoff (base 250ms, cap 30s, ±10% jitter) - Persist cursor to Redis (invoice_indexer_cursor) with in-memory fallback on Redis failure; loadCursor/saveCursor are safe to call while Redis is disconnected - stopIndexer() gracefully quits the Redis connection - startIndexer() accepts _redisClient injection for unit tests - Add indexer-redis-reconnect.test.ts: backoffDelayMs range/growth/ cap, loadCursor fallback, saveCursor persistence and graceful failure, indexer continues polling after Redis drops Closes WHEELBACK#209 Closes WHEELBACK#210 Closes WHEELBACK#211 Closes WHEELBACK#212
|
@Chuks-coderr 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! 🚀 |
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.
Issue #212 — cache treasury balances endpoint
Issue #211 — integration tests for compliance allow/block endpoints
Issue #210 — harden MongoDB connection error handling and pooling
Issue #209 — Redis reconnect backoff for event indexer
Closes #209
Closes #210
Closes #211
Closes #212
Pull Request
Summary
Checklist
abis/andCOMEBACKHERE-contracts/)Notes
make check-abi-snapshots.closes
closes Add Redis reconnection/backoff handling to the event indexer #209
closes Add MongoDB connection error handling and pooling config #210
closes Add integration tests for compliance allow/block endpoints #211
closes Add caching to GET /api/treasury/balances #212