> ## Documentation Index
> Fetch the complete documentation index at: https://qodex.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Failure classification

> Qodex classifies failed runs as real bugs, stale tests, or environment issues before filing findings.

# Failure classification

Failure classification keeps a test suite useful. Qodex does not treat every red run as a product bug. It first decides whether the failure is a real bug, a stale test, or an environment issue.

![Qodex build detail panel showing a failed run before classification and triage](https://mintcdn.com/qodexai/rhkO1RmGEPTQ07wr/images/docs/run-tests/build-results.png?fit=max\&auto=format\&n=rhkO1RmGEPTQ07wr\&q=85\&s=2e8a349abcb8280aa7faf2dd834b36f3)

## The three classes

| Class | Meaning | What Qodex does |
| - | - | - |
| Real bug | The application likely behaved incorrectly | Opens or updates a finding with severity and evidence. |
| Stale test | The test no longer matches the app | Flags the scenario for repair. |
| Environment issue | The target environment, auth, or network failed | Reports the infra issue without filing a product bug. |

When the evidence genuinely cannot tell which it is, Qodex says so instead of guessing.

## What you see on a test run

Each failed or errored scenario on the test run page carries a label that says what the failure was:

| Label | Meaning |
| - | - |
| **Functional regression** | A real bug in a functional check. |
| **Vulnerability present** | A real bug in a security check: the attack worked. |
| **Still present** | A real bug whose finding was already open before this run. |
| **Test needs repair** | A stale test. |
| **Environment** | An environment problem. |
| **Not yet judged** | Classification has not run for this failure yet. It is not a clean result. |

The scheduled-run email uses the same words. For a scheduled run that failed, the report is emailed when the run has a new functional regression or vulnerability. When every failure is a repair, an environment problem, or an issue that was already open, the run page shows **No email: no new regressions**. When some failures are not judged yet, it shows **Email held: some failures are not yet judged**, and the email goes out later if one of them turns out to be a regression.

## Why this matters

Without classification, a renamed button, a staging outage, and a real authentication regression all look the same. That creates noisy reports and missed bugs.

With classification:

* Selector drift becomes a stale-test task.
* Staging downtime becomes an environment note.
* Product regressions become findings.

## Examples

| Failure | Likely class |
| - | - |
| Button moved and cached UI selector no longer matches | Stale test |
| Staging API returned connection timeout for every scenario | Environment issue |
| Login accepts an invalid token and returns user data | Real bug |
| API shape changed intentionally but the assertion was not updated | Stale test |

## Security note

For security scenarios, the classifier still runs first. If the failure is a real bug, security rules then interpret it with inverted semantics: fail means the app allowed the attack, and the run labels it **Vulnerability present**.

## Related

> [card] [Severity model](https://qodex.ai/docs/findings-severity-model.md)
>
> See how real bugs get impact-ranked.

> [card] [Triage workflow](https://qodex.ai/docs/findings-triage-workflow.md)
>
> Review what happens after a finding opens.

> [card] [Re-run failed tests](https://qodex.ai/docs/run-tests-rerun-failed.md)
>
> Confirm fixes and flaky failures.

> [card] [Scenarios](https://qodex.ai/docs/concepts-scenarios.md)
>
> Understand the test unit that can go stale.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.