Email third
follow-up2 letters
Ana gets an email promising a pickup, then a second one taking it back.
Module 65 · Undo for agents
Give every step an opposite step, and do the step you can’t undo last. Here a cable car climbs four stations of a return, and runs back down undoing them when the courier fails.
The whole idea in one example
2 letters
Ana gets an email promising a pickup, then a second one taking it back.
0 letters
The failure comes first, so no email goes out at all.
A hand-written example run: Ana’s return, the bank and QuickPost are made up, and each failure is injected by hand.
How it works
Three steps went through, the fourth failed
Garcia-Molina and Salem (1987): the steps of a saga belong together, so any half-finished run is undesirable and must be compensated for.
Source, checked 3 November 2026
The car runs back down, undoing newest first
Garcia-Molina and Salem (1987): a saga ends either with every step done, or with the steps done so far and then their compensating steps, newest first.
Source, checked 3 November 2026
With the post box at the top, a failure never reaches it
Garcia-Molina and Salem (1987): when a saga’s last step also ends the saga, that last step needs no compensating step at all.
Source, checked 3 November 2026
The story
Larkspur Supply Co.’s assistant handles a return in four steps on a hillside funicular, and learns to undo them when the courier booking fails. You decide each step’s opposite and the order they run in. Ana Ruiz’s cordless drill goes back on the shelf, her $89 is refunded, she is emailed, and QuickPost is booked to collect it.
Your path

Chapter 1 · done
When step four fails after three went through, where does the return stand?






Chapter 7 · done
Which order, opposites, save points and key survive twenty failures?
Anyone whose assistant acts on other systems in several steps. The Agents and Queues modules first help; no maths is needed.