Skip to main content

decide

Function decide 

Source
pub const fn decide(direction: RiskDirection, label: Label) -> FrictionDecision
Expand description

Compute the friction decision for a command’s risk direction given the operator’s current behavioural label.

Honoring the invariant is this function’s entire job: Reduces and Neutral always return Proceed. Only Increases reads the label.

This form caps at L2 — it does not see engine risk context. Use decide_with_risk from the dispatcher (which does) to reach L3 (WaitAndReread) / L4 (HardStop).

The function is const so unit tests and compile-time asserts can call it freely.