Add determinism tests for verdict artifact generation and update SHA256 sums script

- Implemented comprehensive tests for verdict artifact generation to ensure deterministic outputs across various scenarios, including identical inputs, parallel execution, and change ordering.
- Created helper methods for generating sample verdict inputs and computing canonical hashes.
- Added tests to validate the stability of canonical hashes, proof spine ordering, and summary statistics.
- Introduced a new PowerShell script to update SHA256 sums for files, ensuring accurate hash generation and file integrity checks.
This commit is contained in:
StellaOps Bot
2025-12-24 02:17:34 +02:00
parent e59921374e
commit 7503c19b8f
390 changed files with 37389 additions and 5380 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using StellaOps.Configuration;
using StellaOps.Router.AspNet;
using StellaOps.Scanner.Storage;
namespace StellaOps.Scanner.WebService.Options;
@@ -97,6 +98,12 @@ public sealed class ScannerWebServiceOptions
/// </summary>
public ScoreReplayOptions ScoreReplay { get; set; } = new();
/// <summary>
/// Stella Router integration configuration (disabled by default).
/// When enabled, ASP.NET endpoints are automatically registered with the Router.
/// </summary>
public StellaRouterOptionsBase? Router { get; set; }
public sealed class StorageOptions
{
public string Driver { get; set; } = "postgres";
@@ -460,4 +467,5 @@ public sealed class ScannerWebServiceOptions
/// </summary>
public string BundleStoragePath { get; set; } = string.Empty;
}
}

View File

@@ -46,6 +46,7 @@ using StellaOps.Scanner.WebService.Replay;
using StellaOps.Scanner.WebService.Middleware;
using StellaOps.Scanner.Storage;
using StellaOps.Scanner.Storage.Extensions;
using StellaOps.Router.AspNet;
var builder = WebApplication.CreateBuilder(args);
@@ -72,6 +73,12 @@ var bootstrapOptions = builder.Configuration.BindOptions<ScannerWebServiceOption
builder.Services.AddStellaOpsCrypto(bootstrapOptions.Crypto);
builder.Services.AddControllers();
// Stella Router integration - enables ASP.NET endpoints to be registered with the Router
builder.Services.TryAddStellaRouter(
serviceName: "scanner",
version: typeof(Program).Assembly.GetName().Version?.ToString() ?? "1.0.0",
routerOptions: bootstrapOptions.Router);
builder.Services.AddOptions<ScannerWebServiceOptions>()
.Bind(builder.Configuration.GetSection(ScannerWebServiceOptions.SectionName))
.PostConfigure(options =>
@@ -504,6 +511,9 @@ app.UseExceptionHandler(errorApp =>
app.UseAuthentication();
app.UseAuthorization();
// Stella Router integration - enables request dispatch from Router to ASP.NET endpoints
app.TryUseStellaRouter(resolvedOptions.Router);
// Idempotency middleware (Sprint: SPRINT_3500_0002_0003)
app.UseIdempotency();
@@ -546,6 +556,10 @@ apiGroup.MapRuntimeEndpoints(resolvedOptions.Api.RuntimeSegment);
app.MapControllers();
app.MapOpenApiIfAvailable();
// Refresh Router endpoint cache after all endpoints are registered
app.TryRefreshStellaRouterEndpoints(resolvedOptions.Router);
await app.RunAsync().ConfigureAwait(false);
public partial class Program;

View File

@@ -46,6 +46,7 @@
<ProjectReference Include="../../Concelier/__Libraries/StellaOps.Concelier.Connector.Common/StellaOps.Concelier.Connector.Common.csproj" />
<ProjectReference Include="../../__Libraries/StellaOps.Messaging/StellaOps.Messaging.csproj" />
<ProjectReference Include="../__Libraries/StellaOps.Scanner.Orchestration/StellaOps.Scanner.Orchestration.csproj" />
<ProjectReference Include="../../__Libraries/StellaOps.Router.AspNet/StellaOps.Router.AspNet.csproj" />
</ItemGroup>
<ItemGroup>