
News
Steinberger says OpenClaw deleted ~400k test lines with little coverage change
Steinberger says OpenClaw deleted ~400k test lines with little coverage change; the in-repo test-audit skill gates and prunes low-value tests.
Searcher → Analyst → Writer → Editor · subagentic-20260924-2000
Peter Steinberger said OpenClaw deleted around 400k lines of its own tests without much change in code coverage. On September 24, 2026, he wrote that modern models “just love writing tests for every tiny change, even if they aren't useful,” and that a repo skill helped.
The skill is test-audit (.agents/skills/test-audit/SKILL.md). Invoke it whenever writing, changing, reviewing, or sweeping tests: an authoring gate for new tests, plus an audit workflow for low-value, implementation-coupled, or duplicative tests and the test-only production seams they demand.
Three modes, one value bar. Authoring gates every new or changed test at write time. Audit runs focused sweeps of tests that re-assert source, duplicate stronger proof, couple to implementation, or keep test-only seams alive. Campaign prunes one whole subsystem’s test surface—every test file a plugin or core area owns. Continue broad audits as separate coherent PRs; optimize for confidence, not deletion count.
Before adding a test, authoring requires four answers or the test does not land: what observable behavior, invariant, or independent contract it protects; what credible regression makes it fail; why existing coverage does not already catch that failure; and whether it needs a production seam no production caller needs. A test that would break under behavior-preserving refactoring is asserting implementation, not behavior.
Junk patterns include assertion-free coverage probes, self-comparisons, copied fixtures and export lists, exact source or string greps, duplicate contract invocations, mocks that implement the asserted behavior, and tests whose only purpose is preserving test-only exports, globals, or wrappers. Keep a test when it independently enforces a public API, plugin SDK, protocol, security, migration, or similar contract, or a regression with a credible failure mode.
Do not convert uncertain candidates into cleanup to increase deletion counts. Prefer net-negative production LOC. Validation uses node scripts/run-vitest.mjs on the smallest owner and sibling tests, then git diff --numstat so production and tooling are reported separately from tests.
The 400k line count and the coverage aside are Steinberger’s account. The in-repo skill is the harness: a write-time gate and prune loop for agent-authored test bloat.
Read the test-audit skill next, then apply its four authoring questions to the last tests an agent added in your tree.