First time two persons tried my invoicing application, which uses vibe code, it went wrong.
I created a simple invoice management system called Tallyleaf in a single weekend using Cursor and Claude Code. It worked flawlessly on my laptop, which should've been enough to raise a red flag.
When the first time came to edit a record simultaneously by both my friend and I, one of us simply overwrote the other's work without any warnings or errors. Agent does not take concurrency into account since I didn't include it in my prompt, and thus it doesn't create anything that wasn't explicitly asked for.
Now, I include one line in every request I make: what happens if someone else does the exact thing at the same time? It is just a simple practice, but it reveals more than I anticipated.
Does anyone know any checklist or pattern of asking prompt questions to catch such things beforehand? Particularly interested in how to handle shared state as a solo developer with no QA team.
Replies
I'd always test with two accounts before testing real users edit the same data.
That one-line question is a good habit, and for an invoicing app it has a sibling worth adding: what happens if someone does the exact same thing to a record that isn't theirs? Concurrency is two people editing the same invoice. The version that costs more is one person editing an invoice that belongs to a different account, because the agent wrote the update to find the record by its ID and nothing in the prompt said to check who owns it. Two-account test, about five minutes: create an invoice as account A, copy its ID or URL, then log in as account B and try to open it, edit it and delete it, both in the UI and by replaying the API request from devtools. For the overwrite itself, the usual pattern is a version number or updated_at on each record, and the save only succeeds if it still matches what the user loaded, otherwise you return a conflict instead of silently overwriting. Is Tallyleaf one user per account for now, or will teams share invoices?