While Fixing A, I Quietly Break B That Depends on the Same Code
In one sentence: fixing A does not establish that other callers of shared code still work. I should inspect impact and verify existing contracts with proportionate regression evidence.
Symptomโ
I change a shared parser and the current page passes, but a background import breaks. The same function serves input contracts the patch did not consider.
Why this happensโ
Focusing on one error or diff can hide callers, formats, and failure conventions. Search and static analysis add context, but can miss dynamic calls, configuration, and cross-service dependencies. The test pyramid recommends complementary levels, not a fixed ratio or complete regression coverage for every project.
Consequencesโ
Existing behavior changes silently, compatibility issues surface after release, and green CI is mistaken for evidence that every dependency was checked.
What to do insteadโ
- Find callers, shared state, and external contracts. State what was checked and what remains unknown; search results are not a complete impact graph.
- Cover the repair alongside meaningful tests of previously valid inputs, boundaries, and failures.
- Test relevant integration boundaries. Configure required status checks or equivalent protection for CI to block merging before it happens.
- Fewer existing callers can justify fewer compatibility checks, but a one-time migration still needs data invariants, a dry run, and recovery planning. Persistent side effects remain even when a script runs once.
Exampleโ
Before: add a parser format, incidentally change null handling, test only the new page.
After: establish existing callers' null contract; check old and new formats plus invalid input, and identify uncovered external callers.
Version notesโ
This is change-validation guidance, not a claim that every model fails to find callers. Recheck when tooling, call structure, or merge rules change. Passing tests support only the listed scenarios and environment.