DEV Community

Prem Jha
Prem Jha

Posted on

How we used FalkorDB, Graph Theory (WCC, Betweenness, PageRank), and Multi-Agent simulation to catch breaking ecosystem changes before merge.

What if a clean refactor breaks 32 integrations?

On October 16, 2026, Home Assistant merged PR #186863, a refactor that moved sensor entity classes into a separate module.

The core tests passed. Linting was green. Everything looked fine.

But there was a catch: 32 custom integrations depended on internal symbols that the refactor stopped exposing. Those integrations could fail to load when the change reaches users.

This is a classic example of Hyrum’s Law: if enough people depend on your system, someone will depend on behavior you never intended to support.

And with AI coding agents writing and refactoring code faster than ever, catching these issues is becoming increasingly important.

Introducing ShadowGraph

Built for the WeMakeDevs × FalkorDB Graph Hacks Hackathon, ShadowGraph helps developers understand the impact of a code change before merging it.

Instead of checking only the core repository, it maps dependencies across Home Assistant and its external custom integrations.

How it works:

  • Builds a dependency graph: Uses Python AST analysis to identify which integrations import which symbols.
  • Simulates changes: Creates an isolated graph copy and checks what would break if a symbol were removed or changed.
  • Identifies the blast radius: Distinguishes between integrations that fail during import and those that may fail later at runtime.
  • Uses AI agents for verification: Investigates potential breakages and compares findings against static analysis.
  • Suggests migration fixes: Generates draft patches that maintainers can review and apply.

The Home Assistant dataset contains 4,814 integrations and 562,444 import relationships.

Why FalkorDB?

FalkorDB lets ShadowGraph represent dependencies as a graph and efficiently explore how a change can affect downstream projects. Its graph-copy capability also enables isolated simulations without modifying the live graph.

Beyond traditional CI

Traditional CI tells you whether your own tests pass.

ShadowGraph asks a different question:

“Your tests pass, but what breaks for everyone depending on your code?”

It also exposes tools through MCP, allowing AI coding agents such as Claude Code, Cursor, and Codex to check the potential impact of a change before making it.

ShadowGraph is open source under the MIT License.

GitHub: https://github.com/prem-programs/shadowGraph

Built for Graph Hacks across three tracks: connected data, agent memory and coordination, and company knowledge.

The goal is simple: catch breaking changes before your users do.

How does your team check the downstream impact of a refactor today?

Top comments (2)

Collapse
 
sawant_chandra_3caa6ce28e profile image
Sawant Chandra •

Crazyy

Collapse
 
hello_world_e5dc3d3414796 profile image
hello world •

mind fuckinn ideaaaa