5100* tests strengthtenen work

This commit is contained in:
StellaOps Bot
2025-12-24 12:38:34 +02:00
parent 9a08d10b89
commit 02772c7a27
117 changed files with 29941 additions and 66 deletions

View File

@@ -4,6 +4,7 @@ using StellaOps.RiskEngine.Core.Contracts;
using StellaOps.RiskEngine.Core.Providers;
using StellaOps.RiskEngine.Core.Services;
using StellaOps.RiskEngine.Infrastructure.Stores;
using StellaOps.Router.AspNet;
var builder = WebApplication.CreateBuilder(args);
@@ -20,6 +21,13 @@ builder.Services.AddSingleton<IRiskScoreProviderRegistry>(_ =>
new FixExposureProvider()
}));
// Stella Router integration
var routerOptions = builder.Configuration.GetSection("RiskEngine:Router").Get<StellaRouterOptionsBase>();
builder.Services.TryAddStellaRouter(
serviceName: "riskengine",
version: typeof(Program).Assembly.GetName().Version?.ToString() ?? "1.0.0",
routerOptions: routerOptions);
var app = builder.Build();
if (app.Environment.IsDevelopment())
@@ -28,6 +36,7 @@ if (app.Environment.IsDevelopment())
}
app.UseHttpsRedirection();
app.TryUseStellaRouter(routerOptions);
app.MapGet("/risk-scores/providers", (IRiskScoreProviderRegistry registry) =>
Results.Ok(new { providers = registry.ProviderNames.OrderBy(n => n, StringComparer.OrdinalIgnoreCase) }));
@@ -89,6 +98,9 @@ app.MapPost("/risk-scores/simulations/summary", async (
return Results.Ok(new { summary, results });
});
// Refresh Router endpoint cache
app.TryRefreshStellaRouterEndpoints(routerOptions);
app.Run();
static async Task<List<RiskScoreResult>> EvaluateAsync(