# Side-effect fence

A guard around a step that changes something in the world, such as submitting a form or paying, so it is never done twice.

A step marked side_effect is recorded just before it runs and again once it has worked. If a job stops or retries after the fence was crossed, it does not press the button again; it checks what happened and reports it. Fenced steps cannot be retried automatically or made optional.

```
{
  "click": {
    "role": "button",
    "name": "Submit claim"
  },
  "side_effect": true,
  "expect": {
    "visible": {
      "text": "Claim received"
    }
  }
}
```

## Related

- [Never submits twice](/product/side-effects)
- [Forms that must submit exactly once](/use-cases/submit-exactly-once)
- [Idempotency key](/glossary/idempotency-key)
- [Checkpoint](/glossary/checkpoint)
- [Dry run](/glossary/dry-run)
