Skip to content

feat: add blast radius analysis with risk scoring#148

Open
maplenk wants to merge 7 commits intoDeusData:mainfrom
maplenk:feat/blast-radius
Open

feat: add blast radius analysis with risk scoring#148
maplenk wants to merge 7 commits intoDeusData:mainfrom
maplenk:feat/blast-radius

Conversation

@maplenk
Copy link

@maplenk maplenk commented Mar 26, 2026

Summary

New get_impact_analysis tool that answers "what breaks if I change this function?" with risk-tiered results and test coverage detection.

Stacked PR: This builds on #147 (PageRank + Architecture). Please merge #147 first — this PR's unique changes are the 2 commits after PR 1's HEAD.

New tool: get_impact_analysis

Parameters: project, symbol, depth (default 3), include_tests (default true), max_tokens (default 2000)

Key features

  • Custom multi-edge-type BFS: follows CALLS (inbound) + HANDLES (outbound) for callables, HTTP_CALLS + ASYNC_CALLS for routes. Different from generic cbm_store_bfs().
  • Depth grouping: hop 1 = direct (will break), hop 2-3 = indirect (may break), hop 4+ = transitive (ripple risk)
  • Risk scoring (low/medium/high): based on direct caller count, entry-point presence in radius, PageRank percentile, and test coverage
  • Symbol disambiguation: when multiple nodes share a name, auto-picks by non-test file, then PageRank, then in-degree
  • Affected test detection: filters BFS results by test file path
  • Batch node fetching: single chunked SQL query (batches of 900) instead of per-node lookups

Tests

New tests in test_store_search.c (risk tiers, routes+tests, disambiguation) and test_mcp.c (basic, missing symbol, disambiguation, include_tests, route typing).


Part 2 of a 4-PR series. Depends on #147.


Built with OpenAI Codex and Claude Code.

Naman Khator added 7 commits March 26, 2026 12:19
Account for optional signatures in the search_graph and trace_call_path size estimators, and improve compact trace chains to report omitted-node counts.

This also documents the normal-path output enrichment introduced with Task 4: search_graph results now include file_path, start_line, end_line, and signature, and trace_call_path hop items now include file_path, start_line, and signature.
Prefer non-test symbol matches before pagerank for ambiguous short names. Batch-load visited node metadata and pagerank scores to remove per-node query loops during impact analysis. Hide test counts from the public summary when include_tests=false, and add max_tokens truncation support to get_impact_analysis with MCP coverage.
Add the impact-analysis store API declaration, expose get_impact_analysis in CLI help text, and cover the tool with the existing integration fixture.
@DeusData
Copy link
Owner

Thanks @maplenk — blast radius analysis would be very useful for impact assessment. Will review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants