save work

This commit is contained in:
StellaOps Bot
2025-12-19 09:40:41 +02:00
parent 2eafe98d44
commit 43882078a4
44 changed files with 3044 additions and 492 deletions

View File

@@ -156,15 +156,7 @@ public sealed record UnknownItem(
double score,
string? proofRef = null)
{
// Extract reasons from context/kind
var reasons = unknown.Kind switch
{
UnknownKind.MissingVex => ["missing_vex"],
UnknownKind.AmbiguousIndirect => ["ambiguous_indirect_call"],
UnknownKind.NoGraph => ["no_dependency_graph"],
UnknownKind.StaleEvidence => ["stale_evidence"],
_ => [unknown.Kind.ToString().ToLowerInvariant()]
};
var reasons = new[] { unknown.Kind.ToString().ToLowerInvariant() };
return new UnknownItem(
Id: unknown.Id.ToString(),

View File

@@ -18,11 +18,14 @@ namespace StellaOps.Unknowns.Core.Services;
public sealed class NativeUnknownClassifier
{
private readonly TimeProvider _timeProvider;
private readonly string _createdBy;
public NativeUnknownClassifier(TimeProvider timeProvider)
public NativeUnknownClassifier(TimeProvider timeProvider, string createdBy = "unknowns")
{
ArgumentNullException.ThrowIfNull(timeProvider);
ArgumentException.ThrowIfNullOrWhiteSpace(createdBy);
_timeProvider = timeProvider;
_createdBy = createdBy;
}
/// <summary>
@@ -49,7 +52,9 @@ public sealed class NativeUnknownClassifier
Severity = UnknownSeverity.Medium,
Context = SerializeContext(context with { ClassifiedAt = now }),
ValidFrom = now,
SysFrom = now
SysFrom = now,
CreatedAt = now,
CreatedBy = _createdBy
};
}
@@ -82,7 +87,9 @@ public sealed class NativeUnknownClassifier
Severity = UnknownSeverity.Low,
Context = SerializeContext(context with { ClassifiedAt = now }),
ValidFrom = now,
SysFrom = now
SysFrom = now,
CreatedAt = now,
CreatedBy = _createdBy
};
}
@@ -115,7 +122,9 @@ public sealed class NativeUnknownClassifier
Severity = UnknownSeverity.Low,
Context = SerializeContext(context with { ClassifiedAt = now }),
ValidFrom = now,
SysFrom = now
SysFrom = now,
CreatedAt = now,
CreatedBy = _createdBy
};
}
@@ -156,7 +165,9 @@ public sealed class NativeUnknownClassifier
Severity = severity,
Context = SerializeContext(context with { ClassifiedAt = now }),
ValidFrom = now,
SysFrom = now
SysFrom = now,
CreatedAt = now,
CreatedBy = _createdBy
};
}
@@ -184,7 +195,9 @@ public sealed class NativeUnknownClassifier
Severity = UnknownSeverity.Info,
Context = SerializeContext(context with { ClassifiedAt = now }),
ValidFrom = now,
SysFrom = now
SysFrom = now,
CreatedAt = now,
CreatedBy = _createdBy
};
}

View File

@@ -11,5 +11,12 @@
<Description>Core domain models and abstractions for the StellaOps Unknowns module (bitemporal ambiguity tracking)</Description>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../../../Policy/__Libraries/StellaOps.Policy/StellaOps.Policy.csproj" />
</ItemGroup>
</Project>