save progress

This commit is contained in:
master
2026-01-09 18:27:36 +02:00
parent e608752924
commit a21d3dbc1f
361 changed files with 63068 additions and 1192 deletions

View File

@@ -35,7 +35,7 @@ public sealed class ExportNotificationEmitterTests
Assert.True(result.Success);
Assert.Equal(1, result.AttemptCount);
Assert.Single(_sink);
Assert.Equal(1, _sink.Count);
}
[Trait("Category", TestCategories.Unit)]
@@ -84,7 +84,7 @@ public sealed class ExportNotificationEmitterTests
var result = await emitter.EmitAirgapReadyAsync(notification);
Assert.False(result.Success);
Assert.Single(_dlq);
Assert.Equal(1, _dlq.Count);
}
[Trait("Category", TestCategories.Unit)]
@@ -132,7 +132,7 @@ public sealed class ExportNotificationEmitterTests
Assert.True(result.Success);
Assert.Equal(3, result.AttemptCount);
Assert.Empty(_dlq);
Assert.Equal(0, _dlq.Count);
}
[Trait("Category", TestCategories.Unit)]
@@ -221,7 +221,7 @@ public sealed class ExportNotificationEmitterTests
var result = await emitter.EmitAirgapReadyAsync(notification);
Assert.False(result.Success);
Assert.Single(_dlq);
Assert.Equal(1, _dlq.Count);
}
[Trait("Category", TestCategories.Unit)]
@@ -451,7 +451,7 @@ public sealed class InMemoryExportNotificationSinkTests
await sink.PublishAsync("test.channel", "{\"test\":true}");
Assert.Single(sink);
Assert.Equal(1, sink.Count);
}
[Trait("Category", TestCategories.Unit)]
@@ -481,7 +481,7 @@ public sealed class InMemoryExportNotificationSinkTests
await sink.PublishAsync("test", "message2");
sink.Clear();
Assert.Empty(sink);
Assert.Equal(0, sink.Count);
}
}
@@ -496,7 +496,7 @@ public sealed class InMemoryExportNotificationDlqTests
await dlq.EnqueueAsync(entry);
Assert.Single(dlq);
Assert.Equal(1, dlq.Count);
}
[Trait("Category", TestCategories.Unit)]

View File

@@ -175,11 +175,12 @@ public sealed class ExceptionReportGenerator : IExceptionReportGenerator
var entries = new List<ExceptionReportEntry>();
var processedCount = 0;
var referenceTime = job.StartedAt ?? _timeProvider.GetUtcNow();
foreach (var exception in exceptions)
{
var entry = new ExceptionReportEntry
{
Exception = ToReportException(exception)
Exception = ToReportException(exception, referenceTime)
};
if (job.Request.IncludeHistory)
@@ -307,7 +308,7 @@ public sealed class ExceptionReportGenerator : IExceptionReportGenerator
}
}
private static ExceptionReportScope ToReportException(ExceptionObject exc) => new()
private static ExceptionReportScope ToReportException(ExceptionObject exc, DateTimeOffset referenceTime) => new()
{
ExceptionId = exc.ExceptionId,
Version = exc.Version,
@@ -331,7 +332,7 @@ public sealed class ExceptionReportGenerator : IExceptionReportGenerator
UpdatedAt = exc.UpdatedAt,
ApprovedAt = exc.ApprovedAt,
ExpiresAt = exc.ExpiresAt,
IsEffective = exc.IsEffective,
IsEffective = exc.IsEffectiveAt(referenceTime),
EvidenceRefs = exc.EvidenceRefs.ToList(),
CompensatingControls = exc.CompensatingControls.ToList()
};