pub fn build(
builtins: Vec<BuiltinPolicy>,
startup: &HashMap<String, ParsedPolicy>,
operator: &HashMap<String, ParsedPolicy>,
languages: &[&dyn Language],
last_good: &LastGoodPolicies,
) -> (PolicyTree, LoadReport)Expand description
Build the full PolicyTree from every source.
builtins is source 1 (crate::builtin::builtin_policies). startup
is source 2’s already-parsed records
supplied at startup, compiled with no last-good-revision fallback: it is
immutable for the run, so there is never a second revision to have fallen
back from. operator is source 3’s current view – a snapshot taken once
at the start of this call –
compiled with last-good-revision fallback via last_good, which must
be the same LastGoodPolicies passed on every call across this
deployment’s lifetime, or there is nothing for a bad revision to fall
back to. languages are every Language this build carries, used to
compile startup and operator predicates (builtins need none: they
carry already-constructed evaluators).