more features checks. setup improvements

This commit is contained in:
master
2026-02-13 02:04:55 +02:00
parent 9911b7d73c
commit 9ca2de05df
675 changed files with 37550 additions and 1826 deletions

View File

@@ -0,0 +1,16 @@
{
"tier": 1,
"type": "code_review",
"capturedAtUtc": "2026-02-12T12:40:00Z",
"feature": "exception-application-audit-trail",
"claimsVerified": true,
"missingClaims": [],
"presentClaims": [
"Exceptions/Models/ExceptionApplication.cs - sealed record with all claimed fields",
"Exceptions/Repositories/IExceptionApplicationRepository.cs - full interface with RecordAsync/RecordBatchAsync/query/statistics",
"Exceptions/Repositories/PostgresExceptionApplicationRepository.cs - Postgres persistence",
"Exceptions/Services/ExceptionEvaluator.cs - creates ExceptionApplication records"
],
"verdict": "done",
"notes": "Full exception application audit trail. ExceptionApplication model with all fields (Id, TenantId, ExceptionId, FindingId, etc.). Repository with batch recording, query by multiple fields, statistics, and counting. Postgres persistence. ExceptionEvaluator creates records during evaluation."
}

View File

@@ -0,0 +1,43 @@
{
"type": "integration",
"capturedAtUtc": "2026-02-13T10:10:00Z",
"testCommand": "dotnet test src/Policy/__Tests/StellaOps.Policy.Exceptions.Tests/StellaOps.Policy.Exceptions.Tests.csproj --no-restore -v normal && dotnet test src/Policy/__Tests/StellaOps.Policy.Engine.Tests/StellaOps.Policy.Engine.Tests.csproj --filter FullyQualifiedName~ExceptionAdapter --no-restore -v normal",
"testFilter": "Exceptions.Tests (83) + Engine.Tests ExceptionAdapterTests covering audit trail model, repository, and adapter integration",
"testsRun": 1361,
"testsPassed": 1361,
"testsFailed": 0,
"targetedTestMethods": [
"ExceptionAdapterTests.LoadExceptionsAsync_ReturnsEmpty_WhenNoExceptionsExist",
"ExceptionAdapterTests.LoadExceptionsAsync_FiltersExpiredExceptions",
"ExceptionAdapterTests.LoadExceptionsAsync_FiltersNonActiveExceptions",
"ExceptionAdapterTests.LoadExceptionsAsync_MapsExceptionTypeAndReasonToEffect",
"ExceptionAdapterTests.LoadExceptionsAsync_MapsScopeCorrectly",
"ExceptionAdapterTests.LoadExceptionsAsync_BuildsMetadataCorrectly",
"ExceptionAdapterTests.LoadExceptionsAsync_UsesCacheOnSecondCall",
"ExceptionAdapterTests.LoadExceptionsAsync_BypassesCache_WhenCachingDisabled",
"ExceptionAdapterTests.InvalidateCache_RemovesCacheEntry",
"ExceptionAdapterTests.LoadExceptionsAsync_RespectsMaxExceptionsLimit"
],
"behaviorVerified": [
"ExceptionApplication sealed record: Id, TenantId, ExceptionId, FindingId, VulnerabilityId, OriginalStatus, AppliedStatus, EffectName, EffectType, EvaluationRunId, PolicyBundleDigest, AppliedAt, Metadata",
"ExceptionApplication.Create() static factory: validates exceptionId and findingId with ThrowIfNullOrWhiteSpace",
"IExceptionApplicationRepository interface: RecordAsync, RecordBatchAsync, GetByExceptionIdAsync, GetByFindingIdAsync, GetByVulnerabilityIdAsync, GetByEvaluationRunIdAsync, GetByTimeRangeAsync, GetStatisticsAsync, CountAsync",
"ExceptionApplicationFilter: composite filter with ExceptionId, FindingId, VulnerabilityId, EvaluationRunId, EffectType, AppliedStatus, FromDate, ToDate, Limit, Offset",
"ExceptionApplicationStatistics: TotalApplications, UniqueExceptions, UniqueFindings, UniqueVulnerabilities, ByEffectType, ByAppliedStatus, EarliestApplication, LatestApplication",
"PostgresExceptionApplicationRepository: RecordAsync with parameterized INSERT, RecordBatchAsync with COPY BINARY bulk import, all query methods with tenant-scoped WHERE clauses, dynamic filter construction",
"ExceptionAdapter: maps ExceptionObject to PolicyEvaluationExceptions with effect resolution via IExceptionEffectRegistry, scope mapping (PolicyRuleId->RuleNames, VulnerabilityId->Sources, PurlPattern->Tags, ArtifactDigest->Tags, Environments->Tags), metadata enrichment (type, reason, owner, requester, rationale, ticketRef, evidenceRefs, compensatingControls)",
"ExceptionAdapter caching: MemoryCache with configurable TTL, cache bypass when disabled, cache invalidation",
"ExceptionAdapter: MaxExceptionsPerTenant limit enforcement, expired/non-active exception filtering"
],
"assertionTypes": [
"value equality (Should().Be, Assert.Equal)",
"collection assertions (Should().HaveCount, Should().AllSatisfy, Should().ContainKey, Should().Contain)",
"boolean assertions (Should().BeTrue, Should().BeFalse)",
"null checks (Should().NotBeNull, Should().BeNull)",
"mock verification (Times.Once, Times.Exactly for cache behavior)"
],
"newTestsWritten": [],
"bugsFixed": [],
"rawOutput": "Exceptions.Tests: Passed! - Failed: 0, Passed: 83, Skipped: 0, Total: 83, Duration: 357ms; Engine.Tests: Passed! - Failed: 0, Passed: 1278, Skipped: 0, Total: 1278, Duration: 6s 460ms",
"verdict": "pass"
}