41 lines
1.6 KiB
C#
41 lines
1.6 KiB
C#
// SPDX-License-Identifier: BUSL-1.1
|
|
// Copyright (c) 2026 StellaOps
|
|
// Sprint: SPRINT_20260118_030_LIB_verdict_rekor_gate_api
|
|
// Task: TASK-030-005 - Gate Decision Logic (interface for TASK-030-002)
|
|
|
|
using StellaOps.Signals.EvidenceWeightedScore;
|
|
|
|
namespace StellaOps.DeltaVerdict.Bundles;
|
|
|
|
/// <summary>
|
|
/// Evaluates gate decisions based on scoring results and configuration.
|
|
/// </summary>
|
|
public interface IGateEvaluator
|
|
{
|
|
/// <summary>
|
|
/// Evaluates gate decision for a single finding.
|
|
/// </summary>
|
|
/// <param name="finalScore">Final score [0, 1].</param>
|
|
/// <param name="input">Original EWS input for context.</param>
|
|
/// <param name="config">Gate configuration with thresholds.</param>
|
|
/// <param name="evaluatedAt">Evaluation timestamp.</param>
|
|
/// <returns>Gate decision with action, reason, and suggestions.</returns>
|
|
GateDecision Evaluate(
|
|
double finalScore,
|
|
EvidenceWeightedScoreInput input,
|
|
GateConfiguration config,
|
|
DateTimeOffset evaluatedAt);
|
|
|
|
/// <summary>
|
|
/// Evaluates gate decisions for multiple findings in batch.
|
|
/// </summary>
|
|
/// <param name="findings">Collection of score/input pairs.</param>
|
|
/// <param name="config">Gate configuration with thresholds.</param>
|
|
/// <param name="evaluatedAt">Evaluation timestamp.</param>
|
|
/// <returns>Gate decisions for each finding.</returns>
|
|
IReadOnlyList<GateDecision> EvaluateBatch(
|
|
IReadOnlyList<(double FinalScore, EvidenceWeightedScoreInput Input)> findings,
|
|
GateConfiguration config,
|
|
DateTimeOffset evaluatedAt);
|
|
}
|