Documentation
README
⚠️ Illustrative — distilled in a fictional demo run; not about any real project.
Idempotent Side Effects
Overview
A side effect guarded by "look up the key, and if it's missing, do the thing, then record the key" is a check-then-act (TOCTOU) race. Two concurrent requests with the same key both pass the lookup before either records, so the effect fires twice.
Core principle: Check and claim must be ONE atomic operation at the shared store. Looking up a key is not reserving it.
When to Use
This is the opening of the README. Read the full README on GitHub.