Unify regional topology, parallelize cross-region sync, update DLQ do… - #1040
Merged
temma02 merged 1 commit intoJul 28, 2026
Merged
Conversation
…cs, wire circuit-breaker telemetry - Add supabase/functions/_shared/regions.ts as the canonical source for SUPPORTED_REGIONS, per-region env-var resolution, and region detection. - Refactor regional-router, regional-auth/auth-utils, regional-health-check, and consistency-validators to import from the shared module, eliminating seven duplicated region-list declarations and two separate url/key lookup tables. - Reconcile the router's broader country-code mapping (NZ/HK for ap-southeast) into the single source of truth. - Convert syncUserProfileAcrossRegions() from sequential for...of to concurrent Promise.allSettled, bounded by the slowest region rather than the sum of all regions. Include per-region duration in the return value and propagate it through sign-up.ts audit logging. - Update docs/webhook-dead-letter-queue.md to describe the implemented automatic retry schedule (1m/2m/4m/8m/16m/32m ±10% jitter), circuit-breaker thresholds (5 failures → 1-hour pause), and DLQAutoRecovery config surface. - Add injectable onCircuitStateChange callback to DLQRecoveryConfig and wire it into _circuitFor()'s onStateChange handler for ops-dashboard integration. - Add unit tests for concurrent sync bounding and injected circuit-breaker telemetry.
|
@Emeraldson001 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.
…cs, wire circuit-breaker telemetry
Closes #988
Closes #990
Closes #991
Closes #992