Code Change Blast Radius: A Safer Way to Code with AI

Dan Greer · · 11 min read
Code change blast radius illustration for safer AI-assisted coding

Imagine adding a field to an auth API response. The server still returns valid JSON, the browser ignores the extra property, your tests pass, and an older mobile app rejects the response because its decoder doesn't recognize the field. This is a hypothetical change, but the compatibility problem is real.

kotlinx.serialization's JSON decoder throws a SerializationException for unknown properties by default. kotlinx.serialization accepts an explicit setting, such as ignoreUnknownKeys = true, to ignore them, so for the hypothetical mobile app above, I'd test an old decoder against the new response.

I want an AI assistant to show me the consumers before it starts editing, including the ones outside the checkout, because fixing the server and fixing every installed mobile build are different jobs, with different release schedules.

What code change blast radius includes

Code change blast radius is the set of consumers and workflows a change could affect. It's a planning boundary, not a prediction that everything on the list will fail, and I use it to decide where to inspect callers, which tests to run, and whether the change needs a migration.

Start at the changed symbol. Follow the callers back toward the application entry points, across module boundaries, through any shared contracts, until you can explain how the proposed behavior reaches a user or a job.

The direction matters. A function's imports describe what it depends on. Its callers describe who depends on it.

See the dependency graph guide for the direction of those edges.

Here's another hypothetical change: rename an analytics column. Trace the intermediate models that read it, the reporting tables those models populate, the dashboards using those tables, and any scheduled exports. Treat the column name as a contract even if the code review shows only a spelling change.

For either example, write down the consumer you couldn't inspect. An external client outside the mapped repository belongs in the review notes, with the owner who can check it, the contract it expects, and the compatibility question still to answer.

Code change blast radius planning before software updates

Choose review scope before implementation

I use this review rubric. These are human planning categories, separate from any tool's risk label.

Review level What puts a change here What I'd require
Low Isolated callers, a contained effect, and an easy rollback Inspect callers and run their relevant tests
Medium Shared behavior across modules, with consumers that can be inspected Review the affected modules and test the changed contract
High A critical path, strict external consumers, uncertain coverage, or hard-to-reverse effects Agree on compatibility and deployment order before implementation

Count callers, but read them too. A formatting helper with many internal consumers needs a different review from an authorization helper with a few privileged callers, because the failure modes differ, the fallback behavior differs, and the same patch size tells you little about either.

Cleanup-looking changes deserve the same check: renaming a shared function or field, changing a return shape, merging duplicate utilities, moving a module across a package boundary, editing auth, payment or request middleware, and renaming a schema or data-model field. Each one changes what callers can assume without adding a feature.

Then classify reversibility:

  • Easy to roll back: redeploying the previous version restores behavior.

  • Difficult to roll back: reverting also needs data repair or a coordinated release.

  • Impossible to fully undo: an email was delivered, or a webhook recipient already acted.

For a hypothetical payment bug, reverting the function doesn't itself reverse the charge, and refunding it is another operation, with its own consequences, rather than a code rollback. Destructive data changes need the same separate discussion about recovery.

I'd record the failure mode alongside the caller. What happens if the helper throws, returns a missing value, changes the response shape, or takes longer than its caller expects? Choose tests that exercise those assumptions.

For the analytics rename, keep the old contract available until consumers move, check the reports after migration, identify who owns the remaining readers, and only then remove the compatibility path. That is the kind of decision I want the impact check to produce.

For a concrete review, suppose an AI assistant proposes changing checkAdminOrOwner so it returns a permission object instead of a boolean. Before accepting the edit, I would work through this short sequence:

  1. List every caller and mark whether it treats false as an authorization failure, throws on failure, or passes the result into another helper.
  2. Identify the entry points reached by those callers, including HTTP endpoints, jobs, and database operations.
  3. Check whether any caller depends on the current return type or on short-circuit behavior such as if (!checkAdminOrOwner(...)).
  4. Run the relevant authorization, endpoint, and integration tests, then add coverage for the new response shape and failure paths.
  5. Decide whether the old boolean contract must remain during a staged migration. If the change affects a critical path or an external consumer, classify it as high review scope before implementation.
  6. Record the callers checked, tests run, unknown consumers, deployment order, and rollback condition in the impact note.

If the patch also changes a shared helper discovered during this review, I would stop, recalculate the blast radius for that helper, and update the scope rather than treating the original classification as complete.

A real blast radius report

I build Pharaoh, a hosted MCP server that maps a repository into a code knowledge graph of functions, files, modules and dependencies for an AI client to query. get_blast_radius accepts a function, file, or module, then returns a risk level and the production callers, grouped by module and file, with the endpoints, cron jobs and database operations they reach.

The target of this get_blast_radius excerpt is checkAdminOrOwner, run at depth 3 on the repository Pharaoh-so/cal.diy, revision 54343aa6, captured on October 26, 2026. The following caller section is quoted unchanged:

## Affected Callers (14)

### api/v2
- apps/api/v2/src/modules/atoms/controllers/atoms.conferencing-apps.controller.ts: AtomsConferencingAppsController.listUserInstalledConferencingApps (3 hops)
- apps/api/v2/src/modules/atoms/controllers/atoms.event-types.controller.ts: AtomsEventTypesController.getAtomEventTypeApp (2 hops)
- apps/api/v2/src/modules/atoms/services/conferencing-atom.service.ts: ConferencingAtomsService.getUserConferencingApps (2 hops)
- apps/api/v2/src/modules/atoms/services/event-types-atom.service.ts: EventTypesAtomService.getEventTypesAppIntegration
### app-store/_utils
- packages/app-store/_utils/getConnectedApps.ts: getConnectedApps
### trpc/server
- packages/trpc/server/routers/viewer/apps/_router.tsx: $module_init (3 hops)
- packages/trpc/server/routers/viewer/apps/integrations.handler.ts: integrationsHandler (2 hops)
- packages/trpc/server/routers/viewer/ooo/outOfOfficeEntriesList.handler.ts: outOfOfficeEntriesList
### web/modules
- apps/web/modules/data-table/components/segment/DuplicateSegmentDialog.tsx: DuplicateSegmentDialog
- apps/web/modules/data-table/components/segment/FilterSegmentSelect.tsx: FilterSegmentSelect
- apps/web/modules/data-table/components/segment/SaveFilterSegmentButton.tsx: SaveFilterSegmentButton
- apps/web/modules/data-table/components/segment/index.ts: $module_init (2 hops)
- apps/web/modules/users/components/UserTable/UserListTable.tsx: UserListTableContent, UserListTable (2 hops)

The full captured result labels the risk HIGH and also lists two HTTP endpoints and three database read operations. The 14 callers include module initialization entries, so don't read that count as 14 independently exposed features, and don't read HIGH as a measured probability of failure, because the report describes structural exposure.

getConnectedApps.ts contains a caller to inspect alongside the API service and web/modules, with checks on the authorization result each caller expects, the paths to their entry points, and tests for the proposed behavior change. get_blast_radius narrows that work.

The change-impact experiment asks Claude Code about the same function at the same revision, with and without Pharaoh, and reports the prompt, timings and costs, the method, and a correction to how its grader matched caller names.

Know what the report leaves out

Pharaoh supports TypeScript, JavaScript, Python, C and C++. In C and C++, calls through function pointers and to virtual overrides aren't followed, and the docs list the other limits. Its graph follows the default branch, refreshes a live repository after pushes there, and doesn't represent your uncommitted edits, so compare the result with the changes in your working copy before relying on it.

get_blast_radius defaults to three hops and supports up to five. Test-file callers are excluded. Find relevant tests separately, inspect consumers beyond the chosen depth, and record contracts outside the repository as additional review work, because an empty section isn't evidence that those consumers don't exist.

get_unused_code distinguishes Dead from Possibly unused. Dead means the function isn't reached from an entry point, isn't named by another file, and its file has no production import, with all of those signals agreeing. Possibly unused means a naming or import signal remains, and those files need inspection before deletion.

I also want someone to inspect configuration-based dispatch and external contracts rather than assuming a caller list settles them. In the mobile example, check the supported app versions, decode the new response with the old client, confirm how release order works, and keep that evidence next to the server tests.

On Pro workspaces, PR Guard adds four checks: new dead code, breaking signature changes with existing callers, exact function duplicates, and blast radius. Its findings are advisory by default, so it posts a neutral check rather than blocking a merge.

Put the check into the next AI edit

Start with a shared function whose consumers you can inspect, write the intended behavior change, ask your assistant for the caller paths before implementation, and compare its answer with what you already know. Keep the first exercise small enough to review by hand.

To repeat the check, fork the cal.diy repository, install the GitHub App on your fork, and give your assistant this prompt:

Inspect checkAdminOrOwner in cal.diy before changing it.
Use get_blast_radius with depth 3.
Separate direct callers from callers reached through other functions.
Identify the affected endpoints, cron jobs and database operations, and the limits of the result.
Inspect those callers and find relevant tests separately.
Propose a review scope and rollback plan before editing.

Expect the precise results to depend on the mapped revision. The excerpt above records its revision explicitly.

Before approving the implementation, attach a short impact note to the PR. Include the target and revision, callers reviewed, tests run, external consumers still to check, and rollback conditions. Make unresolved questions visible enough for a reviewer to follow up.

Then check the actual patch against that note. If the assistant changes a second shared helper, repeat the analysis for that helper, update the review scope, and test the newly affected callers before treating the original plan as complete.

The change impact analysis guide covers that planning process.

Pharaoh's change-impact documentation explains the tool workflow.

Evaluate a tool against callers you already know

Use a known shared utility as the evaluation target, choose the revision in advance, list a few callers by hand, and compare the report with that list before judging how useful the interface feels.

  • Does it show symbols and paths you can inspect, rather than only a file count?

  • Can you distinguish direct callers from deeper paths and see the traversal limit?

  • Which endpoints or jobs does it identify, and what remains outside its scope?

  • Does it cover your repository's languages and the revision you're changing?

  • Are tests included or excluded, and how will you find the missing test scope?

  • Can the assistant query it before editing and carry the findings into review?

  • What leaves your machine, what is stored, and what repository permissions are required?

  • Does the report help choose a rollout and rollback plan without presenting a risk label as approval?

For Pharaoh, the GitHub App reads the repositories you authorize and its only write is publishing check results: it can't edit files or push commits. Mapping clones the repository into a temporary directory that is deleted when the job ends, and the graph keeps metadata such as names, paths, relationships, complexity, signatures and short doc comments, not your source code.

To try it, install the GitHub App and connect your client. After installing the App on the account that owns the repository, connect each client, sign in with GitHub, and use the setup instructions for your client. npx @pharaoh-so/mcp is the command for Claude Code:

npx @pharaoh-so/mcp

Pick the next shared function you intend to change and review its callers before handing the edit to your assistant.

Article Record

ReferencesPrimary sources used for this article
  1. Understanding Semantic Impact of Source Code Changes: an Empirical Study
  2. Event-Driven Architecture Style - Azure Architecture Center | Microsoft Learn
  3. What Is Blast Radius in Code? — Understanding Change Impact | Axiom Refract | Axiom Refract
  4. Blast Radius Analysis for Code Changes — Know What Breaks Before You Ship | Recursive
  5. Impact Analysis Technique | AI Toolkit | Anthony Bordonaro
Update HistoryMeaningful revisions to this article
Added a Practical Example for Safer AI-Assisted Coding
  • Added a practical example to show how to choose the right review scope before implementation.
Initial publication.

More in Change Impact

← Back to blog