Build1 publisher3 min readPublished
Reinjecting the bug is how this experiment scored its coding agent's patches
A developer ran three change tasks in one Python and TypeScript product against two code-index tools, and counted a run only after the focused test passed and then failed again with the defect put back on purpose.
The Engineer · Build desk
What happened
- A developer ran three fixed change tasks in one private Python and TypeScript product, comparing ordinary source navigation with two code-relationship tools, Code Review Graph and Serena, at five fresh agent sessions per condition.
- A patch counted as correct only if it satisfied a behaviour contract derived from the source, its focused test passed, and that same test failed again once a relevant defect was deliberately put back.
- Before each batch the task and an independent evaluator were frozen, with a known-good patch required to pass and both an untouched fixture and an incomplete patch required to fail.
- Five successes out of five carries an exact 95% confidence interval running from 47.8% to 100%, and the author calls the results small and task-specific.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
- constraint A saved map shortens navigation and supplies nothing about a contract nobody wrote down, so the boundary check stays with the reviewer on every change that crosses a screen or a schema.
- decision Anyone comparing agent setups now needs a gate that can fail, because a suite that stays green after the bug is reinstated cannot separate a complete patch from a plausible one.
- exposure Standardising on a code index off a five-for-five demo accepts a tool whose real failure rate could still be 52.2%, and the rework lands on whoever reviews the fifth file.
- cost Token savings from an index hold only while the index surfaces the file carrying the contract; miss that file and the same change takes a second pass.
Putting the defect back is a test of the test. If the focused test stays green with the bug reinstated, it never covered the behaviour anyone cared about. "A green test that does not fail when the defect returns gives false confidence," the author of the dev.to write-up wrote [8]. That step comes after the two ordinary ones: the patch has to satisfy a behaviour contract read out of the source, and the focused test has to pass [7].
The LLM's role ended before the correctness call. It was used in an earlier round to help decide which questions were worth investigating, and kept out of the pass/fail call, because a model can prefer a short, plausible answer that names the wrong function [9]. For the change tasks, source checks and deliberate mutations were the final gate [10].
The scale is three conditions, five fresh agent sessions each, across three fixed change tasks in one private Python and TypeScript product [11]. That is fifteen runs per task if every task got a full set, and forty-five in total [17]. The post does not state the total.
Five successes out of five carries an exact 95% interval from 47.8% to 100% [14]. That lower bound is 0.478 to the fifth power, which comes to 0.025, so a tool that succeeds on 47.8% of runs still returns a clean sweep of five about one batch in forty [18]. Choosing an index on a 5/5 result means accepting a true failure rate that could sit at 52.2% [19].
The failure modes are more useful than the counts. On the hardest task the author expected the structured map to help most, and instead saw patches that looked plausible and were incomplete: a paginated field absent, a closed vocabulary changed incorrectly, an uncertain state left unprotected [13]. None of those facts live in an import graph. For that result to transfer to your repository, your unwritten contracts have to be the same kind, and your tasks have to cross a boundary the index does not model.
The comparison set was broader before it narrowed: ordinary source search, context packers, language-service bridges, graph indexes, and semantic search, which the author treats as doing different jobs, so that one headline score would hide more than it explains [20][15]. Two tools reached the change tasks, Code Review Graph and Serena, both of which give an agent structured help finding code relationships [11]. The write-up says neither stage is a universal ranking or a token-saving claim [22], and it describes the observations as small and task-specific [23].
The condition that shaped the whole exercise is stated plainly: "A short answer is a saving only when the resulting patch is correct" [4]. An index that finds four files fast and misses the fifth one carrying the contract converts saved tokens into rework [5]. The index is saved navigation. Correctness still comes from the source [6].
What to watch
- Per-task pass counts and token figures from the author's archive, which would let a reader weigh saved navigation against rework.
- Whether the same three-step gate holds in a repository where contracts are written down as schemas or types.
- Whether Code Review Graph or Serena start modelling closed vocabularies and pagination, the places these patches came up short.