Part 1 of 3 — the single-document case.
There's a class of bug that every backend engineer ships at least once, usually
without noticing for months. It hides inside the most innocent-looking operation:
read a document, decide something, write it back.
Take a concrete invariant: a team can hold at most 10 seats. To add a seat you






