Skip to content

Examples

Each example is a short scenario you can run in the sandbox. They go from simple to complex, and each one stands alone.

Example What it shows Level
Safe retries A lost response does not create a second order Simple
Stop an agent Suspend one agent, disable one action or pause everything Simple
Two-person approval Add a rule that needs two people from different roles Intermediate
Roll back a plan A failed step undoes the steps before it Intermediate
When the outcome is unknown A payment’s response is lost, and a person settles it Advanced
Prove what happened Export the audit trail and verify it independently Advanced

Sefra remembers what it has done, orders use up the sample budget, and the starter policy refuses an identical order within 24 hours. So each example begins by resetting the sandbox with ./sandbox destroy and ./sandbox up. Files you created, such as my-bundle, stay.

The sample ERP can fail on request, which is how these examples create realistic problems:

./sandbox erp fail '{"operation": "POST /purchase-orders", "mode": "error", "status": 422}'
Mode What the ERP does on its next matching call
error Answers with the given status and takes no action
commit_then_drop Takes the action, then drops the connection, so the caller cannot know it worked

./sandbox erp state shows the ERP’s records at any point, so you can compare them with what Sefra reports.