The Problem

Every pull request asks the same question: what else does this touch? Most engineering teams answer it by running the entire test suite and waiting, or asking an LLM to guess. Running full test suites on every minor edit wastes time, while LLM guesses are non-deterministic and unreliable.

Inspiration

I wanted a deterministic answer that fits into a single process, runs instantaneously, and works completely offline—even on a plane.

What it does

Blast Radius reads your uncommitted git diff, maps every changed line to its parent function, walks the repository's import graph to find downstream modules and tests, scores the risk level with explicit human-readable reasons, and executes only the impacted test files.

A live interactive force graph visualizes:

  • Black nodes: The modified files/functions.
  • Orange nodes: Everything downstream that the change reaches.
  • Blue nodes: The exact test suite subset selected for execution.

The Demo: A single line change inside apply_discount() in a synthetic shop backend causes the graph to instantly light up cart, payments, and checkout. Blast Radius selects only 4 out of 10 total test files. Three tests fail in under 3 seconds—catching the bug before a PR is even opened. The full test suite finds the exact same failures, but takes far longer by running 6 completely unaffected files.

How I built it

  • blastradius/graph.py: Uses Python’s native ast module to build the import graph, resolving absolute and relative imports while recording every function's precise line span.
  • blastradius/diff.py: Parses git diff -U0 hunks to map modified lines directly to AST function spans.
  • blastradius/engine.py: Executes a BFS over the reverse import graph, calculating path depth, identifying sensitive modules (e.g., payment, auth, pricing), and scoring overall risk.
  • blastradius/server.py & ui.html: A lightweight FastAPI server driving a D3.js visualization console equipped with a "Run Impacted Only" trigger that shells out to pytest.
  • CLI: python -m blastradius --repo . --run provides identical functionality for headless CI/CD environments.

Challenges

Resolving edge-case relative imports across complex Python packages, mapping diff hunks accurately using -U0, and ensuring zero setup friction. Iterated through three versions of the risk model so the generated risk reasons mirror actual senior developer code reviews.

Accomplishments

  • 6 of 6 internal tests passing; performs full analysis in under 300 ms on a 21-module repository.
  • Successfully isolated 4 of 10 test files on the demo app while maintaining 100% bug detection accuracy.
  • Designed, built, and validated solo during the hackathon window.

What I learned

Static AST import graphs provide nearly all the benefits of test-impact analysis without the overhead of dynamic instrumentation. Additionally, actionable presentation matters: a risk score is useless unless accompanied by clear, deterministic reasoning.

What's next

  • Call-graph propagation (function-to-function tracking rather than module-to-module).
  • A GitHub Action to post Blast Radius graphs and impacted test results as PR comments.
  • Multi-language engine support for JavaScript/TypeScript and Go.

Disclosures & AI Tool Usage

  • AI Assistance: Claude 3.7 Sonnet (via Claude Code) was used as an agentic pair programmer for scaffolding UI routes and fast iteration.
  • Architecture & Design: All core algorithms, graph traversal logic, risk scoring models, and demo concepts were designed exclusively by me.
  • Execution: No LLMs or paid APIs run inside the Blast Radius runtime. Zero paid tiers or third-party cloud services were utilized.

Built With

Share this project:

Updates

Submission history