Map the module
Packages, interfaces, goroutines, and blast radius across go.mod — resolved deterministically, for zero LLM tokens.
Implicit interface satisfaction, goroutines, and channels scatter a Go bug across packages with no single line to blame. Codna builds the dependency graph deterministically in about 60ms for zero LLM tokens, so the Go AI bug fix starts from facts, not guesses.
The problem
A failing go test rarely points at the line that broke. The cause hides behind an interface that something else implicitly satisfies, a goroutine that raced on shared state, or a wrapped error that lost its origin three packages away. Reading the whole module into a model is slow, lossy, and burns tokens before any AI Go debugging even begins. Codna resolves the package, interface, and call graph first — including the blast radius across your module — and points the agent straight at the suspect function.
How Codna fixes it
Packages, interfaces, goroutines, and blast radius across go.mod — resolved deterministically, for zero LLM tokens.
The agent receives the failing test, the call chain, and the suspect functions — about 600 tokens instead of the whole repo.
Codna re-runs your own suite; the patch lands only when it builds and the tests pass.
go install github.com/codna/codna@latest codna fix . --issue "TestParseConfig: nil map panic on empty input"
What you get
Codna maps your whole Go module into a dependency and blast-radius graph in about 60ms for zero LLM tokens — no RAG, no embeddings.
The agent fixes from a ~600-token evidence bundle, a measured 162x less context than reading the repo — so this AI coding agent stays cheap and fast.
No patch lands until your own go test suite passes. About $0.04 per verified fix, billed by what the model actually reads.
The proof
Codna maps your module deterministically, hands the agent a ~600-token bundle with the failing test and the relevant call chain, then verifies the patch with go test before it lands. No fix ships unverified.
Yes — Codna verifies every fix against your existing go test suite; the failing test is the oracle, and the patch must compile and pass before it is proposed.
Yes. The deterministic graph resolves which types satisfy an interface and how goroutines and channels share state, so the agent fixes the cause, not a symptom.
Yes — it maps cross-package dependencies across your go.mod, so a fix in one package accounts for its blast radius across the module without you re-reading the tree.
The standard testing package and table-driven tests work out of the box, and runners like testify verify the same way — your existing suite is the source of truth.
Yes. Codna runs self-hosted with bring-your-own-key, fail-closed egress, and no training on your code. It works via CLI, an MCP server for Cursor or Claude, and a native GitHub App.
Related