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:
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
using StellaOps.Configuration;
|
||||
using StellaOps.Router.AspNet;
|
||||
|
||||
namespace StellaOps.Concelier.WebService.Options;
|
||||
|
||||
@@ -37,6 +38,12 @@ public sealed class ConcelierOptions
|
||||
/// </summary>
|
||||
public AirGapOptions AirGap { 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; }
|
||||
|
||||
[Obsolete("Legacy storage has been removed; use PostgresStorage.")]
|
||||
public sealed class LegacyStorageOptions
|
||||
{
|
||||
|
||||
@@ -66,6 +66,7 @@ using HttpResults = Microsoft.AspNetCore.Http.Results;
|
||||
using StellaOps.Concelier.Storage.Advisories;
|
||||
using StellaOps.Concelier.Storage.Aliases;
|
||||
using StellaOps.Provenance;
|
||||
using StellaOps.Router.AspNet;
|
||||
|
||||
namespace StellaOps.Concelier.WebService
|
||||
{
|
||||
@@ -191,6 +192,12 @@ builder.Services.AddSingleton<IOptions<ConcelierOptions>>(_ => Microsoft.Extensi
|
||||
|
||||
builder.Services.AddStellaOpsCrypto(concelierOptions.Crypto);
|
||||
|
||||
// Stella Router integration
|
||||
builder.Services.TryAddStellaRouter(
|
||||
serviceName: "concelier",
|
||||
version: typeof(Program).Assembly.GetName().Version?.ToString() ?? "1.0.0",
|
||||
routerOptions: concelierOptions.Router);
|
||||
|
||||
builder.ConfigureConcelierTelemetry(concelierOptions);
|
||||
|
||||
builder.Services.TryAddSingleton<TimeProvider>(_ => TimeProvider.System);
|
||||
@@ -496,6 +503,9 @@ if (authorityConfigured)
|
||||
app.UseAuthorization();
|
||||
}
|
||||
|
||||
// Stella Router integration
|
||||
app.TryUseStellaRouter(concelierOptions.Router);
|
||||
|
||||
// Deprecation headers for legacy endpoints (CONCELIER-WEB-OAS-63-001)
|
||||
app.UseDeprecationHeaders();
|
||||
|
||||
@@ -3916,6 +3926,9 @@ app.MapGet("/v1/signals/symbols/exists/{advisoryId}", async (
|
||||
return HttpResults.Ok(new SignalsSymbolExistsResponse(Exists: exists, AdvisoryId: advisoryId.Trim()));
|
||||
}).WithName("CheckAffectedSymbolsExist");
|
||||
|
||||
// Refresh Router endpoint cache after all endpoints are registered
|
||||
app.TryRefreshStellaRouterEndpoints(concelierOptions.Router);
|
||||
|
||||
await app.RunAsync();
|
||||
}
|
||||
|
||||
|
||||
@@ -41,5 +41,6 @@
|
||||
<ProjectReference Include="../__Analyzers/StellaOps.Concelier.Merge.Analyzers/StellaOps.Concelier.Merge.Analyzers.csproj"
|
||||
OutputItemType="Analyzer"
|
||||
ReferenceOutputAssembly="false" />
|
||||
<ProjectReference Include="../../__Libraries/StellaOps.Router.AspNet/StellaOps.Router.AspNet.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user