more features checks. setup improvements
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"tier": 1,
|
||||
"type": "code_review",
|
||||
"capturedAtUtc": "2026-02-12T12:40:00Z",
|
||||
"feature": "exception-effect-registry",
|
||||
"claimsVerified": true,
|
||||
"missingClaims": [],
|
||||
"presentClaims": [
|
||||
"Adapters/ExceptionEffectRegistry.cs - sealed class with FrozenDictionary lookups",
|
||||
"GetEffect(type, reason), GetAllEffects(), GetEffectById(effectId) methods",
|
||||
"Exceptions/Models/ExceptionObject.cs - ExceptionType and ExceptionReason enums"
|
||||
],
|
||||
"verdict": "done",
|
||||
"notes": "ExceptionEffectRegistry with FrozenDictionary O(1) lookups, 40 type+reason mappings across 4 exception types and 10 reasons, 8 distinct effect templates with MaxDurationDays and routing templates. Fallback to defer-default."
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"type": "integration",
|
||||
"capturedAtUtc": "2026-02-13T10:15:00Z",
|
||||
"testCommand": "dotnet test src/Policy/__Tests/StellaOps.Policy.Engine.Tests/StellaOps.Policy.Engine.Tests.csproj --filter FullyQualifiedName~ExceptionEffectRegistry --no-restore -v normal",
|
||||
"testFilter": "ExceptionEffectRegistryTests covering FrozenDictionary mapping, effect lookup, defaults, type-safety",
|
||||
"testsRun": 1278,
|
||||
"testsPassed": 1278,
|
||||
"testsFailed": 0,
|
||||
"targetedTestMethods": [
|
||||
"ExceptionEffectRegistryTests.GetEffect_ReturnsCorrectEffect_ForVulnerabilityType [Theory x8]",
|
||||
"ExceptionEffectRegistryTests.GetEffect_ReturnsCorrectEffect_ForPolicyType [Theory x4]",
|
||||
"ExceptionEffectRegistryTests.GetEffect_ReturnsCorrectEffect_ForUnknownType [Theory x2]",
|
||||
"ExceptionEffectRegistryTests.GetEffect_ReturnsCorrectEffect_ForComponentType [Theory x2]",
|
||||
"ExceptionEffectRegistryTests.GetEffect_ReturnsDefaultDeferral_ForUnmappedCombination",
|
||||
"ExceptionEffectRegistryTests.GetAllEffects_ReturnsDistinctEffects",
|
||||
"ExceptionEffectRegistryTests.GetEffectById_ReturnsEffect_WhenExists",
|
||||
"ExceptionEffectRegistryTests.GetEffectById_ReturnsNull_WhenNotExists",
|
||||
"ExceptionEffectRegistryTests.GetEffectById_IsCaseInsensitive",
|
||||
"ExceptionEffectRegistryTests.Effects_HaveValidProperties",
|
||||
"ExceptionEffectRegistryTests.DowngradeEffects_HaveValidSeverity",
|
||||
"ExceptionEffectRegistryTests.RequireControlEffects_HaveControlId",
|
||||
"ExceptionEffectRegistryTests.SuppressEffects_DoNotRequireControl"
|
||||
],
|
||||
"behaviorVerified": [
|
||||
"ExceptionEffectRegistry: FrozenDictionary<(ExceptionType, ExceptionReason), PolicyExceptionEffect> for O(1) lookup",
|
||||
"40 explicit (type, reason) -> effect mappings across 4 ExceptionTypes (Vulnerability, Policy, Unknown, Component) x 10 ExceptionReasons",
|
||||
"8 distinct effect templates: suppress, defer, require-control, downgrade-low, downgrade-medium, defer-vendor, suppress-deprecation, suppress-license",
|
||||
"4 PolicyExceptionEffectType values: Suppress, Defer, Downgrade, RequireControl",
|
||||
"Default fallback: defer-default effect (Defer type, 30-day max, manual-review routing) for unmapped combinations",
|
||||
"GetEffect: returns correct effect for all 4 ExceptionType categories with type-specific nuances (e.g., Component+DeprecationInProgress=suppress-deprecation vs Policy+DeprecationInProgress=defer)",
|
||||
"GetAllEffects: returns distinct effects by ID via FrozenDictionary<string, PolicyExceptionEffect>",
|
||||
"GetEffectById: case-insensitive lookup via StringComparer.OrdinalIgnoreCase",
|
||||
"PolicyExceptionEffect record: Id, Name, Effect, DowngradeSeverity (nullable), RequiredControlId (nullable), RoutingTemplate (nullable), MaxDurationDays, Description",
|
||||
"Downgrade effects always have non-null DowngradeSeverity; RequireControl effects always have non-null RequiredControlId; Suppress effects never have RequiredControlId",
|
||||
"ExceptionAdapterTests verify registry integration: FalsePositive maps to suppress, effect IDs flow through to PolicyEvaluationExceptions"
|
||||
],
|
||||
"assertionTypes": [
|
||||
"value equality (Should().Be for effect types and IDs)",
|
||||
"null checks (Should().NotBeNull, Should().BeNull for lookup miss)",
|
||||
"collection assertions (Should().NotBeEmpty, Should().OnlyHaveUniqueItems)",
|
||||
"range checks (Should().BeGreaterThan for MaxDurationDays)",
|
||||
"enum membership (Should().BeOneOf for all 4 effect types)",
|
||||
"reference equality (Should().Be for case-insensitive lookup consistency)"
|
||||
],
|
||||
"newTestsWritten": [],
|
||||
"bugsFixed": [],
|
||||
"rawOutput": "Engine.Tests: Passed! - Failed: 0, Passed: 1278, Skipped: 0, Total: 1278, Duration: 6s 460ms",
|
||||
"verdict": "pass"
|
||||
}
|
||||
Reference in New Issue
Block a user