pub(super) fn decide_lock_transition(
prev: Option<bool>,
next: Option<bool>,
) -> Option<LockTransition>Expand description
Pure decision: given the previously-known lock state and the freshly-probed state, decide whether the transition is worth surfacing in the log.
Only transitions between confidently-known states
(Some(false) ↔ Some(true)) are reportable — None → Some(true)
is “we just got our first reading and it’s locked”, which we
surface, but Some(true) → None → Some(true) is a flaky probe that
must not generate a “unlocked / locked” log pair.