Refactor code structure and optimize performance across multiple modules

This commit is contained in:
StellaOps Bot
2025-12-26 20:03:22 +02:00
parent c786faae84
commit f10d83c444
1385 changed files with 69732 additions and 10280 deletions

View File

@@ -41,7 +41,8 @@ public sealed class FileSurfaceManifestStoreTests : IAsyncDisposable
new TestCryptoHash());
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task PublishAsync_WritesManifestWithDeterministicDigest()
{
var doc = new SurfaceManifestDocument
@@ -86,7 +87,8 @@ public sealed class FileSurfaceManifestStoreTests : IAsyncDisposable
Assert.Equal(new[] { "a", "z" }, artifact.Metadata!.Keys);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task TryGetByUriAsync_ReturnsPublishedManifest()
{
var doc = new SurfaceManifestDocument
@@ -105,7 +107,8 @@ public sealed class FileSurfaceManifestStoreTests : IAsyncDisposable
Assert.Equal("scan-123", retrieved.ScanId);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task PublishAsync_NormalizesDeterminismMetadataAndAttestations()
{
var doc = new SurfaceManifestDocument
@@ -170,7 +173,8 @@ public sealed class FileSurfaceManifestStoreTests : IAsyncDisposable
Assert.Equal(result.Document.DeterminismMerkleRoot, result.DeterminismMerkleRoot);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task TryGetByDigestAsync_ReturnsManifestAcrossTenants()
{
var doc1 = new SurfaceManifestDocument
@@ -219,6 +223,7 @@ public sealed class FileSurfaceManifestStoreTests : IAsyncDisposable
public async ValueTask<byte[]> ComputeHashAsync(Stream stream, string? algorithmId = null, CancellationToken cancellationToken = default)
{
await using var buffer = new MemoryStream();
using StellaOps.TestKit;
await stream.CopyToAsync(buffer, cancellationToken).ConfigureAwait(false);
return SHA256.HashData(buffer.ToArray());
}