inference bureau
Answers from our docs and articlesesc to close
Try asking
Create an accountSign up

Seeded bug of the week #2: a renamed field breaks a file the diff never touched

A one-line change renames createdAt to created_at in a serializer, and a feed in another file still sorts on createdAt. How each review depth reported it.

Key takeaways

  • Renaming a field in a serializer is a contract change: every consumer of the output still reads the old name, and none of them is in the diff.
  • The changed line is correct on its own, and with one event the broken sort never runs, so a small test passes.
  • In every full eval run, Thorough reported it as High with the broken caller named, and Standard, which reads only the changed files, reported nothing.
  • The case is seeded, two files long and scored against our own answer key, and a type checker would catch this one, so read it as an example rather than a measure.

Seeded bug of the week is a short series. Each one takes a case from the eval set we use to tune Auditor's deep review: a small pull request with one bug planted in it. We show the diff, why it gets past a reader, and what Auditor said about it. Last week's was a charge retry that billed twice.

This week's case is contract-renamed-field. The pull request is titled "snake_case for event JSON".

The change

The repository has an audit event model and a serializer for it:

export interface AuditEvent { id: string; action: string; createdAt: Date }

export function toJSON(e: AuditEvent) {
  return { id: e.id, action: e.action, createdAt: e.createdAt.toISOString() };
}

The pull request changes one line, so the JSON uses snake_case:

  return { id: e.id, action: e.action, created_at: e.createdAt.toISOString() };

In another file, which the pull request doesn't touch, the activity feed serializes events and sorts them:

/** Newest first, as the activity feed shows them. */
export function feed(events: AuditEvent[]) {
  return events.map(toJSON).sort((a, b) => b.createdAt.localeCompare(a.createdAt));
}

Why it looks fine

The diff is one line, and that line is right. It does what the title says, the value is still an ISO string, and a style change to a wire format is an ordinary thing to ask for. A reviewer reading the diff has nothing to object to.

The problem is in feed, and feed isn't in the diff. Nothing in the changed file says who reads toJSON's output. Finding out means searching the repository for callers, which a one-line rename doesn't seem to need.

A test can miss it too. With zero or one event, sort never calls its comparator, so a feed test with one event passes.

How it fails

With two or more events, the comparator runs. Each item now has created_at and no createdAt, so b.createdAt is undefined, and undefined.localeCompare(...) throws a TypeError. The activity feed fails for anyone with more than one event.

The fix

The narrow fix is to sort on the new name. A better one is to sort before serializing, on the model's Date, so the feed's order no longer depends on how the JSON spells its fields:

export function feed(events: AuditEvent[]) {
  return [...events].sort((a, b) => b.createdAt.getTime() - a.createdAt.getTime()).map(toJSON);
}

That fixes the caller in this repository. Any client outside it that reads createdAt, such as a browser app or another service, breaks as well, and no reviewer of this repository can see those. A rename on the wire usually needs a version, or both names for a while.

What Auditor reported

We ran the eval set at both depths on Oct 6 and Oct 11, 2026, with Claude Sonnet 5.5 finding and Claude Opus 5.5 verifying.

Thorough reported it as High on the changed line both times, and in a single-case run on Oct 7. On Oct 11 all four of its passes proposed it, including the one looking for security issues, and the finding was titled "Renamed key breaks feed sort in activity.ts". Its explanation named feed and the comparator, and its failure scenario included the detail that the comparator never runs with one event. The verifier, which can also read the repository, confirmed it, citing the sort's line in activity.ts.

Standard reported nothing, in both runs. On Oct 11 none of its three passes proposed anything. Standard reads the diff and the changed files only, and here the changed file is fine. This is the clearest gap between the depths in our eval, and it's covered more broadly in Standard vs Thorough.

What it cost

On Oct 11, Standard cost $0.011 in three model calls and took about 2 seconds. Thorough cost $0.155 in 23 calls and took about 17 seconds. That's about fourteen times as much, well above the roughly threefold difference across the whole eval, because finding the caller means searching the repository and most of Thorough's calls go to that. For how review costs add up in general, see What an AI code review costs.

The caveats

We planted the bug, in a two-file repository, and the answer key is ours. In a repository this small the caller is easy to find, and in a real one, searching costs more and may miss.

This bug is also one a type checker catches: feed reads a property the serializer's return type no longer has, and Thorough's explanation said so. Real Thorough reviews run the repository's type checker before the deep review, where it's set up for one; the eval measures the deep review alone. The same break gets past types when the consumer reads untyped JSON, as a browser client or another service usually does.

The eval set is small: 22 cases, five of them clean. On Oct 11 Standard found 34 of 38 seeded bugs and Thorough found all 38, and the numbers don't promise the same on your code.

Frequently asked questions

Why doesn't Standard catch a renamed field?

Standard reviews the diff and the files the pull request changed, with no tools to open other files. When the code that breaks is in a file outside the diff, it has nothing to go on. Thorough's passes can search the repository for callers.

Wouldn't TypeScript catch this?

In this case, yes: the feed reads a property the serializer's return type no longer has. It wouldn't if the consumer read untyped JSON, such as a browser client parsing a response, or another service.

Can I use Thorough on some repositories and Standard on others?

Yes. Depth is a team setting on the Auditor page, and each repository can override it in its own settings.

One bill for your apps, your models and your reviews.

Host apps and functions next to your model traffic. Routing picks each turn's model by your quality floor, and Auditor reviews every pull request against your own rules.