Thousands of green tests, 8 epics delivered, and the product does not work: when agents ship correct parts that are wired to nothing
Three breaks in the main journey coexist with thousands of green tests. Why the suite does not see them, and the one test that would have exposed all three at once.
In short
- Symptom
- Every indicator is green (tests, types, lint), and the application's main journey does not reach the end.
- Real cause
- The defects sit between the delivered units: a duplicated path where only one branch is tested, a guard declared but never wired, a component delivered and never mounted. A test strategy with no integration tier never looks there.
- Fix
- One end-to-end test, logged in with an account, on the main journey of the assembled application, and a CI gate you have proven actually blocks.
- Prevention
- A definition of done that requires observable behaviour in the assembled application, and not a green suite.
- Updated
- 2026-10-14
- Read time
- 8 min
- Access
- open
The answer, in three lines
Every part is correct, but nobody ever assembled them. The defects are not inside the delivered units, they are between them, and a test strategy with no integration tier never looks between.
They take three shapes, all invisible to a unit test suite: a duplicated path where only one branch is tested, a guard that is created but never passed on, a component that is built but never mounted. One full journey, played once with a real account, would have been enough to see all three.
The symptom
You have no message to paste into a search engine, and that is exactly the problem: every indicator is green.
$ yarn test
Test Suites: … passed, … total
Tests: … passed, … total
$ yarn lint --max-warnings 0
✔ 0 problems (0 errors, 0 warnings)
$ yarn typecheck
✔ 0 errors
Eight batches of work are marked "done", and the code reviews, serious ones, have passed. Yet when you open the application, the main journey does not reach the end. One screen shows the wrong data, a visible action triggers nothing, and a background job never starts.
The symptom then sounds like this: "the agent delivered, the tests pass, and it still does not work".
The wrong diagnosis
You eventually conclude that the project has a quality problem, which is wrong twice: each part is of good quality, and the defect is not in the parts.
Second wrong diagnosis: "test coverage is insufficient". You add tests, they pass too, coverage goes up, and the product does not move.
On the original project, the quality of each unit was good, against what you would expect. Typing was strict, with almost no escape hatch. Business errors followed a single convention, and the layers did not call each other in circles. Piece by piece, nothing hinted at the failure.
What is actually happening
The defects are not inside the delivered units, they are between them, where a test strategy with no integration tier never looks.
I observed three shapes, all invisible to a unit test suite.
The first is a duplicated path where only one branch is tested. The same business effect exists in a synchronous version and an asynchronous one. The asynchronous version passes the right scope identifier, and the synchronous one passes the caller's. The scope check, a few lines above, had correctly identified the object as private. The result is a data leak from one tenant to another (the customer accounts the application must keep apart), on the synchronous path only. The tests cover the asynchronous path, which is correct, and they are green. The leak is in production.
The second is a guard declared but never wired. An AbortController is created, a 60 s timeout is
documented, but the controller is never passed to the SDK being called. The code reads well,
the test checks that the controller is created, and the timeout does not exist. The file's own
comment says so in plain words, but nobody read it. It is a wiring defect, worse than technical
debt, and thousands of green tests let it through.
The third is a component delivered but never mounted. A card, an action and an error screen are built, tested in isolation, and absent from what the application displays. The component's unit test passes, and no test checks that the component shows up on screen.
All three have the same underlying cause: verification stopped at the edge of each delivery, and the full journey belonged to nobody. The suite checks correct parts and constraint names, but no test follows a behaviour from one part to the next.
The fix
You need to add a test tier that did not exist, instead of fixing the defects one by one.
Step 1: One authenticated end-to-end test on the critical path
Write a single one, on the main journey, against a full containerised environment, without faking the neighbouring services:
docker compose -f docker-compose.e2e.yml up -d --wait
yarn playwright test e2e/parcours-critique.spec.ts
The test logs in, runs the main journey from start to finish, and checks what the user sees, not an API response. It is the only test whose failure means "the product does not work".
Step 2: A CI gate that refuses the merge if that test does not run
The most important test in the repository is also the first one people disable when it gets slow. Make it blocking, and watch it: break the journey on purpose, and check that the pipeline goes red. That proves the gate really blocks.
Step 3: For every duplicated path, a test that exercises both branches
The rule is mechanical: use grep to find the use cases that exist in both a synchronous and an
asynchronous version, and check that both have a test on the same invariant, not on their code.
Check (pass or fail)
# le parcours critique, contre l'application réellement assemblée
yarn e2e --grep "parcours critique" # doit sortir 0
# la porte mord-elle ? on casse, on vérifie que ça rougit, on rétablit.
git stash && sed -i '' 's/enabled: true/enabled: false/' src/config/feature.ts
yarn e2e --grep "parcours critique" # DOIT sortir non nul
git checkout src/config/feature.ts && git stash pop
Prevention
- In a task's definition of done, add a single line: "the behaviour is observable in the assembled application". "The tests pass" is not enough.
- In CI, make the end-to-end tier blocking, on the main journey only. Keep one test: a whole suite would become slow, then optional, then abandoned.
- In the repository instruction file, write: "A task is not done when its tests pass. It is done when the behaviour is observable end to end. If you cannot observe it, say so in your report instead of announcing 'done'."
- In review, add a "wiring" axis: is what was built actually mounted? is what was created actually passed on? It is the axis a reviewer thinks of least, human or agent.
Why this matters with agents
This is the most typical failure of an agent fleet. Its mechanism has nothing to do with bad faith on the agents' part.
An agent is judged on the scope it is given. Split the work into eight batches and hand them out: each agent delivers a correct scope, with its tests, and its report is truthful. Nobody was given the question "does it all work together?", because it was never assigned to anyone. The finer the split, the larger the surface between the batches, and the more of that surface goes untested.
The second mechanism is the report itself. An agent that has finished announces green tests, and that is true word for word. Such a report is much harder to doubt than a vague one. A green dashboard produced by six agents is the most convincing false signal there is, and only checking the full journey stands between you and a product that does not work.
The cost is also very uneven. Finding the failure late took a full journey audit, five corrective branches and a manual integration. An end-to-end test written on day one would have cost half a day.
What this entry does not cover
The branches themselves can also be cut from a stale base: tests are green branch by branch, and the merge produces a wrong result with no conflict.
Where this entry comes from
A full audit of a personal project of eight batches of work delivered by agents, between February and August 2026. The domain terms of the original application were replaced by their structural equivalent: the mechanism is intact, and the business domain is not recognisable.
This entry is part of a notebook of 27 production failures hit between February and September 2026. Some are public and free: see the notebook.
The others are published as they are written, along with the modules and their exercises, as part of the paid product. In that product, the modules are in English; the exercises and the other entries are in French. Nothing on this page is a teaser for it.