The QA agent ran the tests. One failed.
Should the coding agent change the implementation, repair the test or fix the sandbox?
A failed check tells you that an expectation was not met. It does not tell you why. Before changing anything, QA needs to compare the accepted behaviour, the test’s assumptions and the system that actually ran.
Otherwise, agents can spend several rounds fixing the wrong thing.

The same failure can have different causes
Consider an illustrative invoice-export feature. A billing admin requests an export, a background worker creates the file, and the admin downloads it.
The browser test reports “export did not complete.”
That message could describe several different problems.
| Evidence | Possible cause | Next step |
|---|---|---|
| The worker runs but selects the wrong invoices | Product defect | Pass a reproducible finding to implementation |
| The file completes correctly, but the test checks before the job finishes | Test synchronisation problem | Wait for the expected state within an agreed deadline |
| The required worker or queue is unavailable | Environment blocker | Restore the prerequisite and rerun |
| The test expects records that were never seeded | Test-data problem | Check and repair the fixture setup |
These are starting hypotheses. QA still needs evidence before deciding which one explains the failure.
A worker crashing because of the new code is a product defect, even though it appears as an unavailable service.
Find the first point where behaviour diverges
Instead of rerunning the entire browser journey immediately, follow the request.
Was the export accepted? Was a job created? Did the worker receive it? Did it produce a file? Could the correct user download it?
Use the job ID to connect the API response, worker logs and stored result. Record the code revisions, configuration and fixture version too.
A focused check can help narrow the problem. If the worker produces the right file but the UI never updates, investigate that boundary. If no worker started, changing a browser assertion will not establish that the feature works.
The verification sandbox guide covers the environment and diagnostics needed for that investigation.
Check the expectation before changing the test
Suppose the export contains cancelled invoices.
Is that a bug?
The answer comes from the accepted business rule. The test may be outdated, the implementation may be wrong, or the requirement may never have settled the question.
Shared context helps QA find the relevant decision. If it is missing or contradictory, the accountable owner resolves it.
Do not update the assertion simply because the implementation produced a different result.
The same applies to timeouts. Increasing a timeout may be reasonable for an asynchronous workflow, but first check whether the operation eventually completes and whether its timing meets the requirement.
Pass back the diagnosis and its limits
QA should return the observed failure, reproduction steps, relevant evidence and the suspected cause. Keep observations separate from hypotheses.
Route the work to the appropriate owner. Implementation handles a product defect. The test owner handles an incorrect check. The environment owner handles a missing prerequisite.
The QA correction loop should carry that context between agents so a person does not have to reconstruct the investigation at every handoff.
After the correction, rerun against the recorded revisions and environment. A pass on an earlier revision does not verify the latest change.
A retry should not erase the failure
If the test passes on retry, retain the first failure.
It may have been an environment interruption, an unreliable test or an intermittent product bug. One successful rerun does not settle which.
Record the scenario as passed, failed, blocked or not run, with the reason and any remaining uncertainty. An unavailable prerequisite means the required behaviour remains unverified.
In Prinevo’s workflow, shared context, sandbox evidence and communication between QA and implementation support this investigation.
Put this into practice with Prinevo
Follow a controlled failure through the workflow.
When evaluating a QA agent, give it a controlled failure. Can it narrow the cause, send useful evidence to the right owner and verify the correction without weakening the expectation?
Walk through Prinevo’s QA investigation and correction workflow