Accuracy ยท November 1, 2026
We checked codive's call graph against gopls. Here's what broke.
A blast radius tool has one job: tell you what a change can break. If it invents callers, you stop trusting it. If it misses them, it's worse, because you feel safe when you aren't. So we compared codive's Go call graph with gopls, the official Go language server.
How the check works
For a seeded random sample of functions, a small script asks gopls for every reference, maps each one to its enclosing function, and compares that list with the callers codive reports. Anything found by only one tool gets counted and printed so it can be read.
gopls is a strong reference, not absolute truth, and this is a small sample. We exclude folders starting with an underscore, such as _examples, because gopls doesn't load them.
The first run was humbling
On 25 functions each from chi, cobra and gin, codive reported no false callers, but found only 193 of the 242 that gopls listed. Reading the misses turned up four causes:
- A real bug. gin's
ginS.RuncallsEngine.Run, but its engine comes fromsync.OnceValue. codive stubbed the standard library, so the type vanished and the link went with it. - Hidden interface calls. We recorded these as low-confidence guesses, then hid them.
- Functions passed as values. A route handler passed to a router is a real dependency, but it isn't a call.
- A flaw in our own test. We were sampling types and constants, and one lookup could land on the wrong word on a line. That made the score look worse than it was.
What we changed
codive now loads real standard library types using the data the Go toolchain already keeps in its build cache. Interface calls link to the repo types that actually implement the interface, marked as inferred. Functions used as values are recorded as references.
Large repos found what small ones couldn't
Our first version of the standard library fix took gin's reindex from about 9 seconds to 50. The first interface fix took a one-file update on Gitea to 218 seconds. Reading export data and caching interface lookups brought those down to about 5 to 12 seconds and 17 seconds on our machine.
Gitea also crashed codive outright. Its go.mod selects a newer toolchain, so running go inside the repo produced data our binary couldn't read, and the library panicked. codive now runs go outside the repo with the local toolchain, so a repository can't choose what gets executed, and it falls back safely if the data can't be read.
Current results
| Repository | Functions | Agreed | codive only | gopls only |
|---|---|---|---|---|
| spf13/cobra | 60 | 411 | 0 | 0 |
| gin-gonic/gin | 58 | 122 | 0 | 0 |
| junegunn/fzf | 39 | 102 | 0 | 12 |
| go-chi/chi | 60 | 79 | 0 | 24 |
| go-gitea/gitea | 11 | 18 | 0 | 0 |
Cobra supplies most of the agreed links, and only 11 Gitea functions could be checked, so read the rows separately rather than as one score.
What's still missing
- Standard library interfaces. A call through
http.ResponseWriterdoesn't link to your own implementation. The chi misses we reviewed follow this pattern. Expanding them could add a lot of noise, so we've left it as a stated limit for now. - Platform-specific files. In fzf, the misses we reviewed include code in files like
util_windows.go. - Reflection and other runtime-only behaviour.
- Other languages. None of this applies outside Go yet.
Treat codive's results as known callers, not a guarantee. If you find a wrong result, please open an issue with the repo and symbol.