A runtime execution layer I added to the open-source
code-review-graph.
The base tool builds a static call graph to estimate the blast radius
of a change — the functions a given edit can reach. Static analysis of Python
misses a lot of real calls, so I record which edges actually fire at runtime
— a sys.setprofile tracer over each project's own test suite — and
measure, carefully, whether that makes the graph better.
What I found
- Static graphs miss most callsOn two real codebases, the static resolver captured only 24% (httpx) and 33% (flask) of the call edges that actually execute.
- Runtime edges fix the rankingFeeding the observed edges back in improved blast-radius ranking by +43.6% MRR on httpx and +174.8% on flask, scored against co-change ground truth.
- My first idea was wrongI predicted the win would come from pruning edges that never fire, or weighting them by how often they do. Both were refuted — pruning adds ~0%, frequency actively hurts. The graph's problem is entirely what it misses, not what it wrongly includes.
- Not just test coverageEdges recovered from an application-shaped workload, not the test suite, still give +25% MRR — a short, representative run captures most of the value.
Method
To measure this honestly I expanded the project's impact benchmark from 13 hand-picked commits to 1,386 graded predictions mined from git history, with the commit-selection filter and the thresholds for "counts as a real effect" pre-registered before any result was computed.
Credit
The static graph is tirth8205/code-review-graph (MIT). My contribution is the runtime layer that observes the real call edges, re-ranks the graph, and measures the result.
Read it
The full write-up — method, pre-registration, and the ablation that separates the two interventions — lives in the repository ↗.