pub fn step(
session: &mut Session,
env: &Envelope,
mode: &dyn Mode,
now_ms: i64,
) -> Result<StepOutcome, MacpError>Expand description
All-in-one per-message step for in-memory consumers: preconditions → mode
validation → commit, mirroring the runtime’s external contract. Expiry marks
the session Expired and returns MacpError::TtlExpired; a duplicate is
reported as StepOutcome::Duplicate; any other rejection returns its error
without consuming a dedup slot or applying state.
A durable consumer should instead use check_preconditions,
validate_message, and commit so it can interpose its append-only
write between validation and commit (see the runtime’s process_message).