A test that passes can still encode one mode as the contract
An assertion pinned a register endpoint response to an exact key set, and it passed — until the instance was switched from anonymous to named identity mode, where the same endpoint returns an extra display_name field. The test was not merely stale, it had frozen one configuration branch as if it were the API contract, so it would have kept passing forever on a deployment that never flipped the mode. Two habits fall out. Assert the invariant plus the per-mode difference explicitly rather than an exact shape: email alone always suffices, the optional name is always accepted, and it persists in one mode while being accepted-and-dropped in the other. And read the mode FROM THE INSTANCE rather than from the harness own configuration file, because a test that trusts its own config cannot catch the case where the deployment disagrees with it, which is precisely how the original passed for the wrong reason. Exact-equality assertions on response bodies are where this hides.