search and ai stabilization work, localization stablized.

This commit is contained in:
master
2026-02-24 23:29:36 +02:00
parent 4f947a8b61
commit b07d27772e
766 changed files with 55299 additions and 3221 deletions

View File

@@ -5,6 +5,7 @@ using System.Text;
using System.Text.Encodings.Web;
using System.Text.Json;
using System.Text.Json.Serialization;
using static StellaOps.Localization.T;
namespace StellaOps.Evidence.Serialization;
@@ -35,7 +36,7 @@ public static class EvidenceIndexSerializer
public static EvidenceIndex Deserialize(string json)
{
return JsonSerializer.Deserialize<EvidenceIndex>(json, _jsonOptions)
?? throw new InvalidOperationException("Failed to deserialize evidence index");
?? throw new InvalidOperationException(_t("common.evidence.deserialization_failed"));
}
public static string ComputeDigest(EvidenceIndex index)

View File

@@ -2,6 +2,7 @@ using StellaOps.Evidence.Models;
using StellaOps.Evidence.Serialization;
using System.Collections.Immutable;
using System.Globalization;
using static StellaOps.Localization.T;
namespace StellaOps.Evidence.Services;
@@ -18,7 +19,7 @@ public sealed partial class EvidenceLinker
lock (_lock)
{
toolChain = _toolChain ?? throw new InvalidOperationException("ToolChain must be set before building index");
toolChain = _toolChain ?? throw new InvalidOperationException(_t("common.evidence.toolchain_required"));
sboms = _sboms.ToImmutableArray();
attestations = _attestations.ToImmutableArray();
vexDocuments = _vexDocuments.ToImmutableArray();

View File

@@ -16,6 +16,7 @@
<ItemGroup>
<ProjectReference Include="..\StellaOps.Canonical.Json\StellaOps.Canonical.Json.csproj" />
<ProjectReference Include="..\StellaOps.Determinism.Abstractions\StellaOps.Determinism.Abstractions.csproj" />
<ProjectReference Include="..\StellaOps.Localization\StellaOps.Localization.csproj" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,5 +1,6 @@
using System.Reflection;
using static StellaOps.Localization.T;
namespace StellaOps.Evidence.Validation;
@@ -13,13 +14,13 @@ internal static class SchemaLoader
if (resourceName is null)
{
throw new InvalidOperationException($"Schema resource not found: {fileName}");
throw new InvalidOperationException(_t("common.evidence.schema_resource_not_found", fileName));
}
using var stream = assembly.GetManifestResourceStream(resourceName);
if (stream is null)
{
throw new InvalidOperationException($"Schema resource not available: {resourceName}");
throw new InvalidOperationException(_t("common.evidence.schema_resource_not_available", resourceName));
}
using var reader = new StreamReader(stream);