up
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using StellaOps.Policy.Scoring;
|
||||
|
||||
namespace StellaOps.Policy.Engine.Scoring;
|
||||
|
||||
@@ -142,4 +143,18 @@ public sealed record RiskScoringResult(
|
||||
[property: JsonPropertyName("signal_contributions")] IReadOnlyDictionary<string, double> SignalContributions,
|
||||
[property: JsonPropertyName("override_applied")] string? OverrideApplied,
|
||||
[property: JsonPropertyName("override_reason")] string? OverrideReason,
|
||||
[property: JsonPropertyName("scored_at")] DateTimeOffset ScoredAt);
|
||||
[property: JsonPropertyName("scored_at")] DateTimeOffset ScoredAt)
|
||||
{
|
||||
private IReadOnlyList<ScoreExplanation> _explain = Array.Empty<ScoreExplanation>();
|
||||
|
||||
/// <summary>
|
||||
/// Structured explanation of score contributions.
|
||||
/// Sorted deterministically by factor name.
|
||||
/// </summary>
|
||||
[JsonPropertyName("explain")]
|
||||
public IReadOnlyList<ScoreExplanation> Explain
|
||||
{
|
||||
get => _explain;
|
||||
init => _explain = value ?? Array.Empty<ScoreExplanation>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user