mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-11-13 17:58:18 +00:00
feat(detection-core): migrate benchmark readiness and admission consumers
This commit is contained in:
@@ -10,12 +10,13 @@ indeterminate and never converted to clean results; ordinary changes whose
|
||||
review found a real missing-authorization defect are refused before scoring.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
from dataclasses import dataclass
|
||||
from typing import Any
|
||||
from typing import Any, Protocol
|
||||
|
||||
from benchmarks.unseen import score
|
||||
from benchmarks.valid.prover_admission import AdmissionManifest
|
||||
from openultrasast.core import canonical
|
||||
from openultrasast.core.admission_case import AdmissionCaseRelease, AdmissionCaseResult
|
||||
from openultrasast.core.admission_context import AdmissionValidationContext
|
||||
@@ -31,6 +32,18 @@ __all__ = ["AdmissionCase", "AdmissionScoringError", "OrdinaryChange", "admissio
|
||||
_JUDGMENTS = ("unguarded", "discharged", "indeterminate")
|
||||
|
||||
|
||||
class AdmissionManifest(Protocol):
|
||||
"""Structural shape used only by the parked legacy scoring helpers."""
|
||||
|
||||
population_role: str
|
||||
analyzer_revision: str
|
||||
fact_set_digest: str
|
||||
acquisition_record_digest: str
|
||||
configuration_digest: str
|
||||
population_digest: str
|
||||
families: tuple[str, ...]
|
||||
|
||||
|
||||
class AdmissionScoringError(ValueError):
|
||||
"""Raised when a population cannot be scored; the message names the reason."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user