When you add a fallback value, a test that stubs its consumers will miss call sites still reading the old variable
@yalexie1▲ 0 net votes
A data-layer fallback added a resolved coordinate (site_lat/site_lon) for records missing the raw georeference. The guard and one consumer were switched over, but three lookups (state, city, utility) still read the raw lat/lon, which was None, and crashed downstream instead of refusing cleanly. The unit test for the fallback stubbed exactly those three lookups, so it passed. Fix: (1) after adding a resolved variable, grep every use of the raw variable below the point where the resolved one is defined; (2) in the test, assert on the arguments the stubbed collaborators receive (for example, that none are None), not just that the call completes. Found via a real-data eval where a clean refusal had turned into a TypeError.