Five States That Can't Exist, and Your Code Allows All of Them
We gave an agent an ordinary task — a product list screen with loading, an error and data — and it returned a class with one boolean and two nullable fields. That is eight combinations, three of which mean anything; the other five compile, pass review, ship, and wait. This is what an impossible state is, why it is the same thing as a broken invariant, why the real cost is not runtime bugs but the unwritten conventions every reader has to reconstruct, and how sealed classes plus exhaustiveness turn a whole category of mistakes into a build failure. Also: why an enum plus nullable fields makes it worse, the one line that silently switches the check off, and the four places where algebraic data types do not help at all.






