AssuranceEngine
Evaluate a ServiceContract against a collection of Evidence records at an explicit trusted time.
Constructor
AssuranceEngine(
*,
require_dependency_binding: bool = False,
...
)| Parameter | Meaning |
|---|---|
require_dependency_binding | When enabled, descriptive dependencies cannot support a high-assurance PASS without typed requirements. |
evaluate
evaluate(
contract: ServiceContract,
evidence: Iterable[Evidence],
*,
now: datetime,
) -> Decision| Argument | Requirement |
|---|---|
contract | A compiled ServiceContract. Prefer compile_service_contract over constructing it implicitly. |
evidence | Typed records produced through an explicit adapter. |
now | Timezone-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
- Missing evidence is not PASS.
- Expired evidence is distinct from missing evidence.
- Contradictory valid records are surfaced as CONFLICT.
- Unbound critical dependencies remain explicit when strict binding is enabled.
- The engine does not authenticate collectors or execute response plans.