Why generation fencing?
Without a generation, a runner that blipped offline can reclaim → lose the job → wake up → and still “succeed,” overwriting the winner.
Decision
Every reclaim bumps a generation. Heartbeats, status, and terminal events from an older generation are rejected. The superseded runner learns on the next heartbeat and stops cooperatively.
Consequences
- Final status belongs to the current attempt only.
- Same rule on Redis, NATS, and Kafka — no transport-only honesty gap.
- Pairs with the poison-pill ceiling (how many attempts) — fencing is which attempt may write.
Rejected alternatives
- Trust wall-clock leases alone — late writers still win races.
- Fence only terminal Ack — zombies keep working and emit noisy progress.
Skimmable story: design/fencing.html.