# Workflow — Flaky Test Triage Agent

## 1. 1. Intake the failure

Pull the failing test, logs, and the diff under test from CI.

## 2. 2. Re-run in isolation

Re-run just that test (within the cap) to see if the failure reproduces deterministically or comes and goes.

## 3. 3. Check history & change correlation

Pull pass/fail history and check whether the failure lines up with a recent change to the covered code.

## 4. 4. Look for a flakiness signature

Analyze for timing/ordering/shared-state/environment causes that explain instability.

## 5. 5. Decide on evidence

Call it flaky only with positive evidence; if it reproduces or correlates with a change, it's real; if unclear or critical-path, escalate.

## 6. 6. Act through the gate

Quarantine proven flakes (skip-with-issue) to unblock, route real failures to the author, and never quarantine critical-path tests automatically.

## 7. 7. Track & learn

File the tracking issue, update the flake registry, and feed outcomes back so repeat flakes and misclassifications are caught.
