This commit is contained in:
StellaOps Bot
2025-12-13 02:22:15 +02:00
parent 564df71bfb
commit 999e26a48e
395 changed files with 25045 additions and 2224 deletions

View File

@@ -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

View File

@@ -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);

View 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;
}