Skip to main content

goal_presence_residual

Function goal_presence_residual 

Source
pub fn goal_presence_residual(
    spec: &GoalSpec,
    generation: u32,
    observed: &BTreeSet<String>,
) -> Result<Option<ResidualEvent>>
Expand description

Emit a single blocking goal-presence residual when any expected symbol is absent from observed. Returns None when the spec is empty or the goal is already satisfied.

The residual’s raw magnitude is the number of missing symbols, so a node that delivered nothing scores higher than one that is only partially short. Because the severity is ResidualSeverity::Blocking, the gate treats it as a hard failure: V may be otherwise zero, but hard(y) is false, so the node is not accepted.