E0061: task_ensure
E0061 task_ensure — ensure in a [task] handler undoes the current step only.
A compile-time error of soma check, the checker of the Soma programming language (soma explain E0061).
The rule
In a [task] handler a failing ensure undoes only the current step: slot writes made before the last think() are already committed. soma check warns about this, under the code W0014 (habit_warning), when an ensure follows a think() that comes after a slot write. Move those writes after the last think(), or check the condition before them.
When you see it
soma check reports this rule (kind task_ensure) as the warning W0014 habit_warning, never as E0061: the checker files every "habit" issue under W0014 (compiler/src/checker/mod.rs, check_program).