pub fn decide(
seed: &str,
impact: Option<&HostImpact>,
t: &GateThreshold,
) -> (GateDecision, String)Expand description
Pure policy over an already-computed radius. Returns the decision plus a human-readable reason (surfaced to the operator / logged, not machine-parsed).
Policy, evaluated in order (first match wins):
- Empty blast radius →
Allow. - The seed or any downstream node is in
t.protected→Block(names the first hit: seed checked before downstream, downstream in its existing sorted order). t.max_severity_rankis set and the impact’s severity rank exceeds it →Escalate.t.max_downstreamis set and the downstream count exceeds it →Escalate.- Otherwise →
Allow.