Research
CodeHealth Is a Weak but Consistent Predictor of LLM Test Quality, and It Is Negatively Correlated With Token Count
arXiv 2608.18645 (2026-08-19) measures how LLM-generated unit test effectiveness varies with CodeScene's CodeHealth maintainability score across Python, Java and C++, using coverage and mutation score, and separately measures how CodeHealth translates into input tokens under common industrial tokenizers. CodeHealth gives a weak but consistent signal of generated-test effectiveness and is negatively correlated with input token count, meaning messier code costs more tokens and yields worse tests on both axes at once. It is a small result, but it is the kind that justifies a refactor budget to whoever is paying the agent bill.
↳ Follow the thread