Skip to main content

check_drift

Function check_drift 

Source
pub fn check_drift(
    current: &[StatementView],
    committed: &[CommittedStatement],
    severity: &BTreeMap<String, Severity>,
) -> Drift
Expand description

Diff a fresh projection against committed statements (§10):

  • a current statement absent from the document is untriaged (error);
  • a committed not_affected whose key is gone is stale (error);
  • a committed human not_affected whose key is still present but whose current status is no longer not_affected is a dropped suppression (error) — the assertion was removed or no longer applies. Only human statements are status-checked: a plain scan can’t reproduce a machine not_affected (no --reachability=static), so checking its status would false-flag every one; that case is vex verify’s job.
  • a still-present gating-severity under_investigation is a warning.