Fix build and code structure improvements. New but essential UI functionality. CI improvements. Documentation improvements. AI module improvements.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Text.Json;
|
||||
using System.Text.Json;
|
||||
using LedgerReplayHarness;
|
||||
using FluentAssertions;
|
||||
using Xunit;
|
||||
@@ -23,7 +23,6 @@ public class HarnessRunnerTests
|
||||
|
||||
var json = await File.ReadAllTextAsync(tempReport);
|
||||
using var doc = JsonDocument.Parse(json);
|
||||
using StellaOps.TestKit;
|
||||
doc.RootElement.GetProperty("eventsWritten").GetInt64().Should().BeGreaterThan(0);
|
||||
doc.RootElement.GetProperty("status").GetString().Should().Be("pass");
|
||||
doc.RootElement.GetProperty("tenant").GetString().Should().Be("tenant-test");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Diagnostics.Metrics;
|
||||
using System.Diagnostics.Metrics;
|
||||
using System.Linq;
|
||||
using FluentAssertions;
|
||||
using StellaOps.Findings.Ledger.Observability;
|
||||
@@ -195,7 +195,6 @@ public class LedgerMetricsTests
|
||||
public void VersionInfoGauge_EmitsConstantOne()
|
||||
{
|
||||
using var listener = CreateListener();
|
||||
using StellaOps.TestKit;
|
||||
var measurements = new List<(long Value, KeyValuePair<string, object?>[] Tags)>();
|
||||
|
||||
listener.SetMeasurementEventCallback<long>((instrument, measurement, tags, state) =>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Net;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Text.Json.Nodes;
|
||||
using Microsoft.Extensions.Logging.Abstractions;
|
||||
@@ -90,7 +90,6 @@ public sealed class PolicyEngineEvaluationServiceTests
|
||||
var factory = new TestHttpClientFactory(handler);
|
||||
var options = CreateOptions(baseAddress: null);
|
||||
using var cache = new PolicyEvaluationCache(options.PolicyEngine, NullLogger<PolicyEvaluationCache>.Instance);
|
||||
using StellaOps.TestKit;
|
||||
var inline = new InlinePolicyEvaluationService(NullLogger<InlinePolicyEvaluationService>.Instance);
|
||||
var service = new PolicyEngineEvaluationService(factory, inline, cache, Microsoft.Extensions.Options.Options.Create(options), NullLogger<PolicyEngineEvaluationService>.Instance);
|
||||
|
||||
|
||||
@@ -89,10 +89,12 @@ public sealed class OpenApiSchemaTests
|
||||
// Arrange
|
||||
var request = new DecisionRequest
|
||||
{
|
||||
Decision = "accept_risk",
|
||||
Rationale = "Test rationale",
|
||||
JustificationCode = null,
|
||||
Metadata = null
|
||||
DecisionStatus = "accept_risk",
|
||||
ReasonCode = "vulnerable_code_not_in_execute_path",
|
||||
ReasonText = "Test reason text",
|
||||
EvidenceHashes = null,
|
||||
PolicyContext = null,
|
||||
RulesVersion = null
|
||||
};
|
||||
|
||||
// Act
|
||||
@@ -100,12 +102,12 @@ public sealed class OpenApiSchemaTests
|
||||
var doc = JsonDocument.Parse(json);
|
||||
var root = doc.RootElement;
|
||||
|
||||
// Assert - decision and rationale are required per OpenAPI spec
|
||||
root.TryGetProperty("decision", out var decision).Should().BeTrue();
|
||||
decision.GetString().Should().NotBeNullOrEmpty();
|
||||
// Assert - decision_status and reason_code are required per OpenAPI spec
|
||||
root.TryGetProperty("decision_status", out var decisionStatus).Should().BeTrue();
|
||||
decisionStatus.GetString().Should().NotBeNullOrEmpty();
|
||||
|
||||
root.TryGetProperty("rationale", out var rationale).Should().BeTrue();
|
||||
rationale.GetString().Should().NotBeNullOrEmpty();
|
||||
root.TryGetProperty("reason_code", out var reasonCode).Should().BeTrue();
|
||||
reasonCode.GetString().Should().NotBeNullOrEmpty();
|
||||
}
|
||||
|
||||
[Fact(DisplayName = "BundleVerificationResponse includes all fields")]
|
||||
@@ -168,8 +170,8 @@ public sealed class OpenApiSchemaTests
|
||||
{
|
||||
var request = new DecisionRequest
|
||||
{
|
||||
Decision = decision,
|
||||
Rationale = "Test rationale"
|
||||
DecisionStatus = decision,
|
||||
ReasonCode = "vulnerable_code_not_in_execute_path"
|
||||
};
|
||||
|
||||
var json = JsonSerializer.Serialize(request, JsonOptions);
|
||||
|
||||
@@ -12,14 +12,7 @@
|
||||
<ProjectReference Include="../../../__Libraries/StellaOps.TestKit/StellaOps.TestKit.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.0" />
|
||||
<PackageReference Include="xunit" Version="2.9.3" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FluentAssertions" Version="8.0.0" />
|
||||
<PackageReference Include="Moq" Version="4.20.72" />
|
||||
<PackageReference Include="FluentAssertions" />
|
||||
<PackageReference Include="Moq" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user