feat: Implement Runtime Facts ingestion service and NDJSON reader
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled
- Added RuntimeFactsNdjsonReader for reading NDJSON formatted runtime facts. - Introduced IRuntimeFactsIngestionService interface and its implementation. - Enhanced Program.cs to register new services and endpoints for runtime facts. - Updated CallgraphIngestionService to include CAS URI in stored artifacts. - Created RuntimeFactsValidationException for validation errors during ingestion. - Added tests for RuntimeFactsIngestionService and RuntimeFactsNdjsonReader. - Implemented SignalsSealedModeMonitor for compliance checks in sealed mode. - Updated project dependencies for testing utilities.
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
|
||||
namespace StellaOps.Signals.Options;
|
||||
|
||||
public sealed class SignalsAirGapOptions
|
||||
{
|
||||
public SignalsSealedModeOptions SealedMode { get; } = new();
|
||||
|
||||
public void Validate()
|
||||
{
|
||||
SealedMode.Validate();
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SignalsSealedModeOptions
|
||||
{
|
||||
public bool EnforcementEnabled { get; set; }
|
||||
|
||||
public string? EvidencePath { get; set; }
|
||||
|
||||
public TimeSpan MaxEvidenceAge { get; set; } = TimeSpan.FromHours(6);
|
||||
|
||||
public TimeSpan CacheLifetime { get; set; } = TimeSpan.FromMinutes(1);
|
||||
|
||||
public bool RequireEvidenceHealth { get; set; } = true;
|
||||
|
||||
public void Validate()
|
||||
{
|
||||
if (!EnforcementEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(EvidencePath))
|
||||
{
|
||||
throw new InvalidOperationException("Signals air-gap sealed-mode evidence path must be configured when enforcement is enabled.");
|
||||
}
|
||||
|
||||
if (MaxEvidenceAge <= TimeSpan.Zero)
|
||||
{
|
||||
throw new InvalidOperationException("Signals air-gap sealed-mode max evidence age must be greater than zero.");
|
||||
}
|
||||
|
||||
if (CacheLifetime <= TimeSpan.Zero)
|
||||
{
|
||||
throw new InvalidOperationException("Signals air-gap sealed-mode cache lifetime must be greater than zero.");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user