Section 4.3Source:
server/src/analytics/impact/ImpactAnalyzer.tsImpact Analysis (Upstream)
Calculates the complete blast radius of modifying a file or symbol by walking incoming structural relationships backward.
Source:
server/src/analytics/impact/ImpactAnalyzer.tsUpstream Reachability Semantics
In CodeGraph, an edge A --[calls]--> B means A calls B. Therefore, if an engineer changes B, the entity directly affected is A.
The ImpactAnalyzer traverses the graph with direction: "incoming" across the 5 structural relationship kinds:
server/src/analytics/impact/ImpactAnalyzer.ts
1234567891011121314151617181920212223export class ImpactAnalyzer { constructor(private readonly traversal: GraphTraversal) {} analyze(sourceNodeId: string, options: ImpactAnalysisOptions = {}): ImpactAnalysisResult { const traversalResult = this.traversal.traverse(sourceNodeId, { direction: "incoming", relationshipKinds: [ "calls", "imports", "extends", "implements", "instantiates", ], maxDepth: options.maxDepth, }); return { sourceNodeId, impactedNodeIds: traversalResult.nodes, depthByNode: traversalResult.depthByNode, }; } }
Interpreting Hop Depth
- Depth 1: Direct consumers (immediate callers, direct file importers, direct subclasses).
- Depth 2: Transitive consumers (callers of callers).
- Depth N: Distant upstream modules affected by transitive dependency chains.