Writing
Notes on building things that have to be right
Exactly-once crediting is a unique index, not a queue setting
Retries, crashes and concurrent requests all try to pay twice. What actually stops them is a constraint in the durable store, and the tests that prove the constraint is reached.
Treat the LLM like a flaky dependency
Notes from building a grounded assistant: isolate the model behind ports, make failure cheap, and never let the model decide whether an answer is true.