Appropriate use
Use when a test passes and fails across comparable runs, consumes CI time, or is repeatedly retried or quarantined.
Diagnoses inconsistent test results by separating product nondeterminism, automation defects, shared data, timing, infrastructure, environment, order, and concurrency effects.
This page defines the behaviour, controls, evidence, and outputs required from the skill. It does not claim that a language model can enforce security or correctness by wording alone.
Use when a test passes and fails across comparable runs, consumes CI time, or is repeatedly retried or quarantined.
Do not use to mark a test flaky after one failure, quarantine indefinitely, or rerun until green without preserving first-attempt evidence.
Each phase has explicit inputs and outputs. Approval gates are hard stops bound to exact versions and hashes.
Resolve test identity, repository commit, application build, CI job, runner image, browser, retries, historical attempts, quarantine status, and failure signatures.
Group failures by assertion, timeout, selector, network, data, crash, environment, setup, teardown, and product symptom rather than treating every red run as one flake.
Create testable hypotheses for product race, automation timing, selector instability, data collision, order dependence, concurrency, infrastructure, dependency, and environment drift.
Define bounded repetitions, retry-disabled runs, order randomisation, worker counts, isolated data, network capture, trace, and resource sampling.
Run the matrix while preserving every attempt, seed, worker, timing, trace, logs, resource state, and environment health.
Evaluate which variable consistently changes the outcome and distinguish correlation from causal evidence.
Recommend product defect, automation fix, data isolation, infrastructure work, environment fix, temporary quarantine with expiry, or more evidence.
Publish the analysis, apply approved changes, and prove improvement with retry-disabled validation across the relevant conditions.
An approval cannot be reused after its environment, source, action plan, or approved document changes.
| Gate | Decision | Required binding |
|---|---|---|
| 1 | Gate 1 · approve evidence | Approval stores approver, role, timestamp, context hash, approved document hash, expiry, and invalidation state. |
| 2 | Gate 2 · approve experiment | Approval stores approver, role, timestamp, context hash, approved document hash, expiry, and invalidation state. |
| 3 | Gate 3 · confirm disposition | Approval stores approver, role, timestamp, context hash, approved document hash, expiry, and invalidation state. |
| 4 | Gate 4 · publish | Approval stores approver, role, timestamp, context hash, approved document hash, expiry, and invalidation state. |
Attempt outcomes remain separate from these workflow results. Errors, cancellations, and invalid context are never silently converted into a pass.
The product produces inconsistent outcomes under controlled equivalent conditions.
Automation logic, selectors, timing, fixtures, or cleanup cause inconsistent results.
Shared or stale data changes the test outcome.
Runner, browser process, network, service, or resource conditions cause the inconsistency.
Outcome depends on execution order, workers, or simultaneous operations.
Available evidence does not establish genuine flakiness or a leading cause.
Evidence has provenance, capture context, privacy classification, retention, and integrity metadata. A convenient artifact is not automatically sufficient proof.
| Claim | Primary evidence | Required validation |
|---|---|---|
| History | First-attempt run records | Retries and final green results do not hide original failures. |
| Signature | Trace, error, screenshot, and log cluster | Different failures are analysed separately. |
| Environment | Runner and application health | Resource exhaustion and service outages are visible. |
| Data | Resource IDs and fixture state | Collisions and stale state can be reconstructed. |
| Order/concurrency | Seed, order, and worker count | The exact schedule is recorded. |
| Remediation | Retry-disabled before/after runs | Improvement is measured on comparable conditions. |
These controls belong in the runtime, connector permissions, sandbox, renderer, storage layer, and review process.
A single failure is investigated but not automatically called flaky.
Configured and manual retries remain visible in evidence and metrics.
Repetition has a fixed budget and cannot overload shared systems.
Temporary quarantine requires owner, reason, review date, and release impact.
A real intermittent product bug is not fixed by weakening the test.
Remediation proves first-attempt reliability, not only final pass rate.
The first applicable high-severity outcome takes precedence. A manual override is recorded separately and never rewrites the calculated result.
Evidence is insufficient to confirm flakiness or cause.
Route as a product defect and keep coverage visible.
Fix automation or isolation and validate retry-disabled.
Route runner, network, service, or environment work.
Controlled first-attempt reliability meets the approved threshold.
The workflow documents what it cannot prove and what further evidence would change confidence.
Human summaries are generated from validated structured records. They are not maintained as separate, drifting sources of truth.
flake-context.jsonVersioned output produced by the workflow.
history-snapshot.jsonVersioned output produced by the workflow.
signature-clusters.yamlVersioned output produced by the workflow.
hypothesis-plan.mdVersioned output produced by the workflow.
experiment-ledger.jsonlVersioned output produced by the workflow.
evidence-manifest.jsonVersioned output produced by the workflow.
causal-analysis.mdVersioned output produced by the workflow.
disposition.jsonVersioned output produced by the workflow.
validation-results.mdVersioned output produced by the workflow.
flaky-triage.htmlVersioned output produced by the workflow.
artifacts/qa/flaky-test-triage/<run-id>/ ├── flake-context.json ├── history-snapshot.json ├── signature-clusters.yaml ├── hypothesis-plan.md ├── experiment-ledger.jsonl ├── evidence-manifest.json ├── causal-analysis.md ├── disposition.json ├── validation-results.md └── flaky-triage.html
Investigate why the playlist drag-and-drop Playwright test fails about 8% of CI runs and passes on retry.
Flake classification: TEST FLAKE Cause: The test releases the mouse before the drop target finishes its layout transition. The final assertion checks API state but not the visible order. Evidence: - Failure follows reduced CPU allocation. - Network and API responses are successful. - Adding a fixed wait changes frequency but does not remove the race. - Waiting for stable target geometry removes the failure in 100 retry-disabled runs. Remediation: Use a stable drag completion signal and assert both UI order and persisted API order.
The written skill is only one layer. The repository, runtime, connectors, evidence storage, and publication path must implement these requirements.
Diagnoses inconsistent test results by separating product nondeterminism, automation defects, shared data, timing, infrastructure, environment, order, and concurrency effects.