The most important part of an AI factory is not the code. It is the testing.
A factory’s role is to produce a product. Code is the material that moves down the line, and nobody signs the material. The finished product carries a signature at the end of it, the name that stands behind the thing when it reaches a user, and the signature is the part that matters. A signature is a promise made by someone who checked. Testing is the checking. That is why a factory’s value sits in its testing and not in its code.
I built a software factory to build my own app, and I have not written or read a single line of the code it produced. The first version arrived in about two weeks, and it looked 90% done. Getting from that version to one people could use without running into problems took about two more months. The code was the fast part of that story. Almost all of the remaining time was testing: finding what the code actually did, in the hands of someone using it for the first time.
That ratio is the argument. Generation has become cheap and fast, and it keeps getting cheaper. Verification has not kept pace. A factory that generates code faster than it can verify code is producing inventory, not software. The app reaches production exactly as fast as you can test it, and no faster.
Nobody read the code
This matters more now because of how the code gets written. A vibe-coded app is code nobody read line by line. The author described what they wanted, the model produced it, and the author ran it and saw that it worked. That sentence, “it worked,” usually means the happy path worked once, on the author’s machine, with the author’s data.
The author cannot vouch for code they have not read. They do not know what is in it: which edge cases were handled, which were silently skipped, what happens with empty data, hostile data, ten thousand users instead of one. Traditional development carried an assumption underneath it, that somebody understood the code because somebody wrote it. Remove the human author and that assumption goes with them. The testing is where the understanding gets built. In a factory, the testers are the first ones to learn what the app actually does.
That is also why the tests inside the codebase cannot carry the weight. The same agent that wrote the code writes the unit tests, from the same reading of the requirements. When the reading is wrong, code and tests are wrong together, and everything passes. A unit test written by the code’s own author proves the code agrees with itself. Agreement is not correctness. Writing the tests first changes the order, and the order was never the problem; the assumptions ride through either way. (That argument gets its own essay, “Why TDD Is Not Enough.”) Unit tests still earn their place as a fast regression net when the code changes. What they cannot be is the evidence behind the signature, because the signer would be checking the work with the worker’s own checklist.
So the testing has to be designed with the same care as the generation. In my factory it runs in three lanes, and each lane asks a different question.
Black box: does it do what was asked?
The black box tester holds the requirements and nothing else. It tests the behavior from the outside, the way a user meets the app: follow the flow, enter what a person would enter, expect what the requirements promise. It has no interest in how the app is built. Its job is the gap between what was asked for and what a user actually experiences.
That gap is real even when the requirements were done well. Mine were specced and grilled in detail before building started, and the sharpest problems still surfaced in this lane, because a requirement describes the product the builder had in mind and a user test meets the product that exists. Scenarios nobody thought to specify live in that gap.
White box: where will it break?
The white box tester hunts edge cases, the ones that are not obvious from the behavior. Finding them requires knowing where the seams are, and seams are internal: a retry limit, a timeout, a cache, a size cap, a state that changes halfway through a flow.
Here is the part that surprises people. The white box tester does not get access to the code either. Instead it gets a developer agent it can interrogate, an agent that knows the implementation and answers functional questions. How many times does it retry before giving up? What happens when the second step succeeds and the third one fails? What is the largest input this accepts?
Each answer points the tester at a boundary to attack: at the limit, just past it, when the retry runs out, when two things happen at once. And the interrogation produces a second kind of finding. When the developer agent’s answer and the observed behavior disagree, the implementation has drifted from the intent, and that drift is a defect class of its own. A tester reading the code would rationalize what it found, because the code always looks intentional. A tester holding only the claims has nothing to rationalize with. It tests the claims against the behavior, and reports where they part.
Red team: how would I misuse it?
The third lane is adversarial. The red team tester is not verifying the app and not hunting accidents. It is trying to misuse the app on purpose: inputs designed to break it, flows used in ways no honest user would, attempts to reach data or actions that should be out of reach, instructions hidden in content the app reads.
For a human-written app, red teaming is a security exercise near the end. For a vibe-coded app it belongs in the loop, because nobody reviewed the code for any of this. The author does not know whether the app checks who is asking before it shows a record. The red team finds out by trying.
Existing apps: baseline first
Everything above assumes a new app, where the requirements are the reference. An existing app has a different reference: its current behavior, most of it undocumented, some of it load-bearing in ways nobody remembers.
So when the factory takes over an existing app, the testers’ first job is the baseline, before any change gets tested. Run the app as it stands, record what it actually does across its flows, and pin that behavior as the reference. From then on, every change the factory makes gets measured against the pin. A difference the change intended is progress. A difference nobody intended is a regression, and the baseline is what lets you tell the two apart. Without it, they look identical, because nobody can say what the behavior was before.
Pin the behavior before you touch it. That ordering is the whole rule.
The test
Look at where your factory spends its time and its model budget. If generation is the large share and testing is what fits around it, you have a code generator with a queue of unverified output behind it. The factories that ship reliably run the other way: the code is the cheap input, and the testing is the factory.
When your factory ships an app, it carries your signature. Who checked what it does at its edges, under attack, and compared to what it did yesterday, before that signature went on? If the honest answer is nobody, the code was never the part you were missing.