Metakit / Verify a state machine

Verify a state machine in CI

A state machine here is a set of named transitions over one Effect Schema: each transition has a guard (when it may run) and writes (what it changes), and the Schema's rules must still hold afterwards. When the machine grows, someone eventually weakens a guard on a critical transition or adds an opaque helper (a plain JavaScript function metakit cannot read). If the proof then quietly falls from "proved" to "could not decide", CI stays green while the guarantee disappears.

Prove.machine checks every transition of a Machine and gives each one of three results: proved (no state the guard allows can break a rule), refuted (it found a state and input that do break one) or undecided (it could not tell). Under its default rules the report fails unless every transition is proved, or is undecided and named in allowUnknown with a reason. pin names the transitions that must stay proved. A refuted transition prints the values that break it and a Transition.run call that repeats the failure.