Cricket Manager
Decision 9 of 13

Prove single-writer correctness before trusting the log

One decision from Cricket Manager, which asks: How do you make a simulated cricketer behave like the real one — and how would you know if you had failed?


The engine and the auction were built against in-memory adapters first, so they could be tested without any real infrastructure. Wiring them to a real database and a real-time layer meant the event log's central guarantee had to be proved rather than assumed.

The database itself refuses two events at the same position in the same stream, and a test fires 8 simultaneous append attempts to prove it. If two bids can occupy the same version of the same stream, event sourcing has bought nothing.

Identity in the live room follows the same posture: server-derived identity — client-asserted user IDs are never trusted. In a room where identity determines who owns a bid, accepting the client's word for who it is would be the whole vulnerability.

Your opinion

Would you have decided this differently?

Where do you stand?

What gets published. I read every opinion and publish substantive ones, including those that disagree with me, as a scroll on this page. I may add a reply. I leave out spam, abuse and anything off-topic, so please include only what you’d be happy to see in public.

Where it goes. I keep your opinion, your stance and, if you allow it, your name in a database run by Neon. I don’t ask for your email or store your IP address, but Netlify, which hosts this site, may log it when it handles your request. To have yours removed, email pkrishna@vaulthai.health. A published opinion is removed from the site, though it can remain in my site’s version history.

Next