Map the failing path
Codna builds a dependency and blast-radius graph of the repository from its import patterns. No model call, zero tokens.
It passed last release. It fails now. Codna maps the code for zero tokens, fixes the cause rather than the symptom, and reports the regression risk of the fix itself.
The problem
Codna builds a dependency and blast-radius graph of the repository from its import patterns. No model call, zero tokens. The failing test and the code it depends on become the evidence bundle, so the agent finds the change that broke the behaviour instead of patching the assertion.
How Codna fixes it
Codna builds a dependency and blast-radius graph of the repository from its import patterns. No model call, zero tokens.
The agent receives an evidence bundle scoped to the issue: the suspect files, the call paths, the failing test. Codna prints the raw-to-bundle token size on every run. Every fix reports root cause, confidence, blast radius and regression risk, and passes a risk gate before it is applied or a pull request opens.
Run codna fix --tests --apply and Codna runs your tests in a sandbox and re-fixes until they pass, up to the iteration limit you set. Set fix.test_command in codna.yaml, or pass --test-cmd, when your runner is not pytest. codna impact lists the tests a diff can affect, so the next change runs the right ones.
codna fix . --issue "checkout total wrong since last release; test_apply_discount was passing" --tests --apply
What you get
The agent works from the failing test and its call chain, not from the assertion alone.
Codna reports the risk of the fix before you apply it.
codna impact prints the tests a diff can affect, offline and for zero tokens.
The proof
Give Codna the failing test as the issue. Codna builds a dependency and blast-radius graph of the repository from its import patterns. No model call, zero tokens. The agent receives an evidence bundle scoped to the issue: the suspect files, the call paths, the failing test. Codna prints the raw-to-bundle token size on every run.
The blast-radius graph says what a change reaches, and the fix reports regression risk. That is the question a regression asks.
The agent works from the call chain into the failing behaviour. The pull request states the root cause so you can judge it.
Describe the behaviour in --issue. Add a failing test and use --tests --apply to verify the fix against it.
Codna prints the raw-to-bundle size on every run. On 87 matched bug-fix cases against Cursor, Codna averaged 16,159 total tokens and about $0.02 of model spend per verified fix, 5× fewer tokens and 1.7× faster. With your own key you pay your provider directly.
Codna ships as a CLI, an MCP server for Cursor and Claude, a GitHub Action (thyn-ai/codna-action@v1) and a GitHub App that reviews every pull request and opens fix PRs from a label, a comment or a red check.
Related