Explanation

How circular testing gives AI-generated code a false pass

Why can AI-generated tests agree with faulty AI-generated code?

Circular testing happens when the expectation comes from the same implementation or assumptions being evaluated. An AI can faithfully reproduce a mistake in both code and tests. Use requirements, independently worked examples and a separate review of the evidence to break that dependency.

Where does the loop close?

A model reads a function, observes its output and turns that output into an expected value. A second model can reach the same answer if it receives the same function and instructions. Compare the sources of the answers when assessing independence.

What would expose the mistake?

Give the tester the business rule and reviewed examples. Keep a separate set of cases for evaluation, preserve the first failure and try a deliberate fault against a critical assertion. If the requirement is ambiguous, return the question to its owner before grading the result.

Worked example

The wrong parcel count becomes the answer

A function reports two parcels for thirteen items even though each parcel holds at most six. A generated test records two because the function returned two. A reviewer who works the packing example from the capacity rule expects three, and can explain the discrepancy without inspecting either model’s answer.

Try it on your pull request

Choose a change in your repository and tell Cue April what should happen. Review the proposed checks before they run.

Try Cue April on your repository