-
Notifications
You must be signed in to change notification settings - Fork 1
features impact analysis
Active contributors: Bryan
Impact analysis answers "what might break if I touch this?" It resolves a target symbol or node, finds direct callers and callees, and traverses a bounded blast radius through the graph.
The feature is implemented in src/lode/graph.py and exposed through lode impact in src/lode/cli.py plus /impact in src/lode/daemon.py.
src/lode/graph.py # impact_targets, impact_report, blast_radius
src/lode/cli.py # impact command
src/lode/daemon.py # /impact endpoint
tests/test_graph.py
graph TD
Target[User target] --> Resolve[impact_targets]
Resolve --> Direct[direct callers and callees]
Resolve --> Blast[blast_radius BFS]
Blast --> Files[affected files]
Blast --> Entry[affected entrypoints]
Direct --> Report[impact_report JSON]
Files --> Report
Entry --> Report
impact_report() includes direct relationships, affected files, affected entrypoints, traversal direction, depth, max-node safety caps, and scoped blast-radius entries. Shadowed external placeholders are filtered so local definitions do not get drowned out by unresolved external symbols.
| File | Purpose |
|---|---|
src/lode/graph.py |
Impact and blast-radius implementation. |
src/lode/cli.py |
lode impact handler. |
src/lode/daemon.py |
/impact endpoint. |
tests/test_graph.py |
Impact regression tests. |
Change the traversal edge set in TRAVERSAL_EDGE_KINDS in src/lode/graph.py. Change output shape in impact_report(), then update CLI, daemon, and tests together.