Prompt·Correctness and reliability·R05
Updates that overwrite each other
Finds updates that overwrite newer data because two things wrote at once.
Prompt
Find race conditions and out-of-order updates across background jobs, UI mutations, caches, webhooks, and database writes. Prove suspected problems with reproducible cases.
- What it returns
- A reproduction for each race (a script or test that loses an update) rather than a theory.
- Skip it when
- Data that only one thing ever writes.
- Changes
- Adds a test that shows it
- Sessions
- Look first, then fix in a new session
- Tools
- Repository; a local or branch-copy database to reproduce the problem.
- Watch for
- Agents list theoretical races freely. Count only the ones with a reproduction.
- Also called
- Races and stale writes
Skills it uses
Related prompts
- Code that relies on lucky timingPromptFinds code that only works because things usually happen in the right order.
- Two systems that disagreePromptFinds data kept in two places (a saved copy and a table, the browser and the server) that can quietly disagree.
- Safe to run twice?PromptFinds actions that do damage when they run twice: double sends, double charges, duplicate rows.
- Map every place that writes to the databasePromptSeveral jobs, functions, APIs or agents change the same data, or nobody is sure who owns it.
More in Correctness and reliability.