Skip to content

feat: implement Stellar Provider SLA Evaluator and Soroban Route Fallback Planner (#469, #470)#683

Merged
mijinummi merged 1 commit into
MDTechLabs:mainfrom
nanlebenthel-web:fix/issues-469-470-stellar
Jun 28, 2026
Merged

feat: implement Stellar Provider SLA Evaluator and Soroban Route Fallback Planner (#469, #470)#683
mijinummi merged 1 commit into
MDTechLabs:mainfrom
nanlebenthel-web:fix/issues-469-470-stellar

Conversation

@nanlebenthel-web

Copy link
Copy Markdown
Contributor

Closes #469
Closes #470
Closes #471
Closes #472

Summary

This PR implements two features assigned to me.


#469 — Stellar Provider SLA Evaluator

Path: src/monitoring/sla/providers/stellar/

Files:

  • types.tsSLATargets, UptimeCheck, SLAEvaluation, SLAProviderReport, and config types
  • stellar-provider-sla-evaluator.tsStellarProviderSlaEvaluator class
  • index.ts — barrel export

What it does:

  • Tracks uptime probes (recordSuccess / recordFailure) per provider within a rolling configurable window (default 24 h)
  • Evaluates four SLA dimensions: uptime %, average response time, p99 response time, and overall success rate
  • Each dimension returns a pass / warn / fail verdict; the overall verdict is the worst across all dimensions
  • Fires onBreach / onRecovery callbacks on state transitions to drive alerting
  • generateReport() / generateAllReports() produce structured SLAProviderReport objects with multi-window stats, recommendations, and a human-readable summary

#470 — Soroban Route Fallback Planner

Path: src/routing/fallbacks/stellar/

Files:

  • types.tsFallbackReason, RankedFallbackRoute, FallbackPlanResult, FailoverPolicy, and config types
  • soroban-route-fallback-planner.tsSorobanRouteFallbackPlanner class
  • index.ts — barrel export

What it does:

  • registerRoutes() maintains a pool of candidate routes
  • plan(failedRoute, reason, excludeProviders?) generates a ranked list of alternatives:
    1. Excludes the failed provider and any extra excluded providers
    2. Filters to routes on the same source → destination chains
    3. Excludes routes whose provider reliability score is below the configured threshold
    4. Ranks survivors by a weighted composite score (reliability-heavy by default in fallback scenarios)
    5. Returns a FallbackPlanResult with ranked alternatives, best route, and shouldAutoFailover flag
  • markProviderUnavailable() zeroes a provider's reliability score to exclude it from future plans immediately
  • updateReliability() restores a provider's score once it recovers

…back Planner

Closes MDTechLabs#469
Closes MDTechLabs#470
Closes MDTechLabs#471
Closes MDTechLabs#472

- MDTechLabs#469: Implement Stellar Provider SLA Evaluator
  src/monitoring/sla/providers/stellar/

  StellarProviderSlaEvaluator tracks uptime checks and response times
  per provider within a rolling window (default 24 h). Evaluates four
  SLA dimensions: uptime %, average response time, p99 response time,
  and success rate. Each dimension returns a pass/warn/fail verdict;
  the overall verdict is the worst across all dimensions.
  Fires onBreach / onRecovery callbacks on state transitions.
  generateReport() / generateAllReports() produce structured
  SLAProviderReport objects with per-window stats and recommendations.

- MDTechLabs#470: Implement Soroban Route Fallback Planner
  src/routing/fallbacks/stellar/

  SorobanRouteFallbackPlanner generates ranked alternative routes when a
  preferred route fails. plan() excludes the failed provider (and any
  extra excluded providers), filters candidates to the same source/dest
  chains, applies a minimum reliability threshold, and ranks survivors by
  a weighted score of fee, speed, and provider reliability (defaulting to
  favour reliability in fallback scenarios). Returns a FallbackPlanResult
  with a ranked alternatives list, the best route, and a shouldAutoFailover
  flag driven by the configured FailoverPolicy.
  markProviderUnavailable() immediately zeros a provider reliability score
  to exclude it from future plans until explicitly restored.
@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@nanlebenthel-web 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! 🚀

Learn more about application limits

@mijinummi mijinummi merged commit 3b00fbb into MDTechLabs:main Jun 28, 2026
1 check 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

2 participants