AssuranceEngine

Evaluate a ServiceContract against a collection of Evidence records at an explicit trusted time.

Constructor

AssuranceEngine(
    *,
    require_dependency_binding: bool = False,
    ...
)
ParameterMeaning
require_dependency_bindingWhen enabled, descriptive dependencies cannot support a high-assurance PASS without typed requirements.

evaluate

evaluate(
    contract: ServiceContract,
    evidence: Iterable[Evidence],
    *,
    now: datetime,
) -> Decision
ArgumentRequirement
contractA compiled ServiceContract. Prefer compile_service_contract over constructing it implicitly.
evidenceTyped records produced through an explicit adapter.
nowTimezone-aware evaluation time used for freshness and ordering.

Returns

A Decision containing the top-level state, per-control results and dependency outcomes. Preserve the object when an operator or downstream policy must explain the result.

Example with strict dependency binding

engine = AssuranceEngine(
    require_dependency_binding=True
)
decision = engine.evaluate(
    contract,
    evidence,
    now=trusted_time,
)

if decision.state.value != "PASS":
    route_to_response_plan(decision)

Interpretation rules