up
This commit is contained in:
@@ -21,8 +21,12 @@ public sealed class ReachabilityFactDocument
|
||||
|
||||
public ContextFacts? ContextFacts { get; set; }
|
||||
|
||||
public UncertaintyDocument? Uncertainty { get; set; }
|
||||
|
||||
public double Score { get; set; }
|
||||
|
||||
public double RiskScore { get; set; }
|
||||
|
||||
public int UnknownsCount { get; set; }
|
||||
|
||||
public double UnknownsPressure { get; set; }
|
||||
@@ -42,6 +46,16 @@ public sealed class ReachabilityStateDocument
|
||||
|
||||
public string Bucket { get; set; } = "unknown";
|
||||
|
||||
/// <summary>
|
||||
/// v1 lattice state code (U, SR, SU, RO, RU, CR, CU, X).
|
||||
/// </summary>
|
||||
public string? LatticeState { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Previous lattice state before this transition (for audit trail).
|
||||
/// </summary>
|
||||
public string? PreviousLatticeState { get; set; }
|
||||
|
||||
public double Weight { get; set; }
|
||||
|
||||
public double Score { get; set; }
|
||||
@@ -49,6 +63,11 @@ public sealed class ReachabilityStateDocument
|
||||
public List<string> Path { get; set; } = new();
|
||||
|
||||
public ReachabilityEvidenceDocument Evidence { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Timestamp of the last lattice state transition.
|
||||
/// </summary>
|
||||
public DateTimeOffset? LatticeTransitionAt { get; set; }
|
||||
}
|
||||
|
||||
public sealed class ReachabilityEvidenceDocument
|
||||
|
||||
@@ -14,8 +14,13 @@ public sealed record ReachabilityFactUpdatedEvent(
|
||||
double Weight,
|
||||
int StateCount,
|
||||
double FactScore,
|
||||
double RiskScore,
|
||||
int UnknownsCount,
|
||||
double UnknownsPressure,
|
||||
int UncertaintyCount,
|
||||
double MaxEntropy,
|
||||
double AverageEntropy,
|
||||
double AverageConfidence,
|
||||
DateTimeOffset ComputedAtUtc,
|
||||
string[] Targets);
|
||||
string[] Targets,
|
||||
string[] UncertaintyCodes);
|
||||
|
||||
52
src/Signals/StellaOps.Signals/Models/UncertaintyDocument.cs
Normal file
52
src/Signals/StellaOps.Signals/Models/UncertaintyDocument.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace StellaOps.Signals.Models;
|
||||
|
||||
public sealed class UncertaintyDocument
|
||||
{
|
||||
public List<UncertaintyStateDocument> States { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Aggregate tier (T1=High, T2=Medium, T3=Low, T4=Negligible).
|
||||
/// Computed as the maximum severity tier across all states.
|
||||
/// </summary>
|
||||
public string? AggregateTier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Risk score incorporating tier-based modifiers and entropy boost.
|
||||
/// </summary>
|
||||
public double? RiskScore { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Timestamp when the uncertainty was computed.
|
||||
/// </summary>
|
||||
public DateTimeOffset? ComputedAt { get; set; }
|
||||
}
|
||||
|
||||
public sealed class UncertaintyStateDocument
|
||||
{
|
||||
public string Code { get; set; } = string.Empty;
|
||||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public double Entropy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Tier for this specific state (T1-T4).
|
||||
/// </summary>
|
||||
public string? Tier { get; set; }
|
||||
|
||||
public List<UncertaintyEvidenceDocument> Evidence { get; set; } = new();
|
||||
|
||||
public DateTimeOffset? Timestamp { get; set; }
|
||||
}
|
||||
|
||||
public sealed class UncertaintyEvidenceDocument
|
||||
{
|
||||
public string Type { get; set; } = string.Empty;
|
||||
|
||||
public string SourceId { get; set; } = string.Empty;
|
||||
|
||||
public string Detail { get; set; } = string.Empty;
|
||||
}
|
||||
Reference in New Issue
Block a user