pub fn evaluate(subject: &Subject<'_>, tree: &PolicyTree) -> VerdictExpand description
Evaluate a subject against a PolicyTree, in the tree’s presentational
order.
Any EvalError from a candidate’s evaluator,
and any candidate whose predicate is
Predicate::Unusable — see
PolicyTree::decide — is treated as a refusal: fail-closed, and
scoped to exactly the subject that predicate was asked about, never
escalated to Outcome::Freeze on its own. This is deny-only
monotonicity’s third consequence from plan/policy.md: a predicate
that cannot answer can only make the verdict more restrictive, never
less.
The decision channel short-circuits: once a Outcome::Freeze is seen,
no severity can outrank it, so remaining candidates are not asked to
decide. (They may still be reached by
PolicyTree::observation_candidates — a separate walk this function
does not perform; see that method’s doc comment for why observation is
independent of decision.)