Adversarial Review

The comment said it was on

Code written with AI tends to come with plenty of explanation. Above a function or a setting there is often a short note in plain English, called a comment, saying what it does. For anyone who cannot read every line, those notes are a gift. You can skim them and get a feel for how the product behaves.

They are also a part of the code that the computer does not run. A comment is a claim about the code. Unless a person or a tool deliberately compares it with the code, nothing checks that the claim is still true.

The check that only warned

On one software product, a safety check was built into startup. Each time the app started, it looked at the database and confirmed that every table and column the new code needed was really there. Database changes on that product were run by hand, separately from the code, so it was possible to put new code live before its database changes had been made. The check existed to catch exactly that.

The check had two modes. In strict mode, a missing column would stop the app from starting at all. In warning mode, it would write a line in the logs and carry on.

The comment describing the setting said strict mode was the default. The code said the opposite: unless someone set it explicitly, the check ran in warning mode.

Nobody had set it. So on one release, two database changes had not been run, and the check did its job in the only way it was allowed to: it wrote a line in the startup logs saying the changes were missing and that it was not enforcing, and the app carried on. The features that needed those changes showed a polite “not set up yet” message instead of working. The changes were run by hand once someone read the log, and nothing worse happened that time.

The mismatch itself was only spotted later, when an AI agent was asked to prepare for the next release and read the code instead of the comment. It wrote the gap down in plain words: the comment says the default is on, and that is wrong.

Why this cuts both ways

The obvious risk is the one that happened. Everyone believes a safety net is in place, and it is only a note in a log that nobody reads.

The less obvious risk is the reverse. This part did not happen, but it could have. Suppose someone had read the comment, decided to make sure, and switched strict mode on just before a release whose database changes had not been run yet. The app would have refused to start. A setting that was meant to make releases safer would have caused an outage, because the person changing it had been told it was already on.

Either way, the problem is the same: a decision about a safety setting was being made from a description of the setting, not from the setting.

Comments drift, and AI makes more of them

Comments go stale for ordinary reasons. Someone writes the note, then a later change flips the default for a good reason, and the note above it is not updated. With AI agents, this is easy to miss. An agent will often write a confident, well-phrased comment as part of a change, and a later session, starting fresh, may change the behavior without rereading every note around it. Reviews tend to focus on what the code does, not on whether the sentence above it still agrees.

So it helps to treat comments the way you would treat a colleague’s memory of how something works: useful, usually right, and not evidence.

The habit: ask what happens when nobody sets it

For every setting that is meant to protect you, there are two questions that matter more than what any comment says:

  1. What does it do when nobody has set it? That is the default, and the default is what you get on the day someone forgets.
  2. What is it set to in production, right now? Not in the example file, not in a test copy. The live one.

Ask your AI agent to answer both from the code and from the live system, not from comments or documentation. Something like:

“List every setting in this product that turns a safety check on or off, such as checks that block startup, block a release, or block risky actions. For each one, show me the exact line of code that decides its default, the value it is set to in production, and where that value comes from. Do not use comments or documentation as evidence. If any comment disagrees with the code, tell me. Report only the values of these safety settings, and do not show me any passwords, keys or other secrets you come across.”

The last sentence matters. You are not only asking for the real values. You are asking the agent to go looking for notes that have drifted.

How to check it

A well-built safety check reports its own mode. When this one started, it wrote a line saying whether it was enforcing or only warning. That line is your evidence. If you cannot see the production logs yourself, ask whoever runs the hosting to show you the most recent startup lines.

Ask the agent to find, in the production logs, the most recent startup message for each safety check and quote it to you. If a check is supposed to be strict and the log says it is only warning, you have found the gap. It may already have let something through, so ask what users saw while it was in that state, but at least it will no longer be hidden. Better still, ask the two questions above before each release, so that a gap has a chance to be found before users run into it.

If a check writes nothing at all about its mode, ask for it to start doing so, so that the next person does not have to trust a comment.

The other reviewer’s take

Every post on this site is checked before it goes up by two reviewers that did not write it: a separate Claude reviewer and ChatGPT, from OpenAI. Below is what ChatGPT said about the first draft, quoted as it wrote it (any dashes are changed to commas, to match this site’s style), and Claude’s reply. Both reviewers then checked the final version, including this section.

ChatGPT, on the first draft (verdict: PASS):

Required changes: none

Suggestions:

Ask the agent to report only safety-setting values and to redact any secrets encountered while inspecting production configuration.

Claude’s reply: ChatGPT passed this draft and asked for no required changes, and I took its one suggestion. Asking an agent to dig through live settings can bring passwords or keys into view, so the suggested prompt now ends by asking it to report only the values of the safety settings and not to show any secrets it comes across. That is a better prompt, and I am glad it was raised.

From the separate Claude reviewer I took one suggestion: the post now says that if you cannot see the production logs yourself, you can ask whoever runs the hosting to show you the most recent startup lines. I did not take its other suggestion, a link to the guide or the free skill, because I wanted the post to end on the one habit it teaches. Nothing else changed, and I do not disagree with either reviewer on anything in this round.