stipping 0.1.0

An auditable request-confirm-observe state machine for reliable stop confirmation
Documentation
  • Coverage
  • 100%
    48 out of 48 items documented1 out of 22 items with examples
  • Size
  • Source code size: 18.3 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 407.3 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • hidenoriuehara-art

stipping

stipping expresses stop confirmation as a small, auditable state machine. A stop request is not treated as success until intent has been acknowledged and the stopped condition has been independently observed.

use stipping::{Observation, StopConfirmation, StopState};

let mut stop = StopConfirmation::new("conveyor")?;
stop.request_stop("operator pressed STOP")?;
stop.confirm_intent("controller accepted request")?;
stop.verify(Observation::stopped("speed sensor reads zero"))?;

assert_eq!(stop.state(), StopState::StoppedConfirmed);
assert!(stop.is_stopped_confirmed());
# Ok::<(), stipping::StopError>(())

Principle

  1. Record who or what is being stopped and why.
  2. Confirm that the stop request was understood.
  3. Verify observed cessation rather than assuming it.
  4. Preserve every accepted transition as an ordered audit trail.

An Observation::Active result leaves the machine in IntentConfirmed, so the caller can observe again. Pending requests may also be cancelled explicitly. The crate has no dependencies and performs no I/O, timing, or hardware control.

License

MIT