Skip to content
Back to skills

Flaky Test Quarantine

ASecurity

The standard protocol for identifying, quarantining, and systematically eliminating intermittent or flaky test failures in CI.

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 7, 2026
ai-agentstypescriptpythonrustgotestingdatabaseci/cd

Security analysis

A100/100

Scanned October 7, 2026

npx -y skills add romangalaxys10-spec/fable --skill flaky-test-quarantine --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Flaky Test Quarantine?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Flaky Test Quarantine
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/romangalaxys10-spec-flaky-test-quarantine/badge)](https://www.skillsdirectory.com/skills/romangalaxys10-spec-flaky-test-quarantine)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: flaky-test-quarantine
title: Flaky Test Quarantine & Deflaking Protocol
category: Strategy & Reliability
testingTypes:
  - Reliability
  - CI/CD
  - Flakiness
frameworks:
  - Universal
  - Playwright
  - Vitest
languages:
  - TypeScript
  - Python
author: Pramod Dutta (QASkills.sh)
---

# Flaky Test Quarantine & Deflaking Protocol

The standard protocol for identifying, quarantining, and systematically eliminating intermittent or flaky test failures in CI.

## The Quarantine Mental Model

1. **The Trunk Protection Invariant**:
   - A flaky test is worse than a broken test because it destroys team trust in CI.
   - When a test fails intermittently (>1% failure rate without code changes), quarantine it immediately with a `@quarantine` tag.
   - Run quarantined tests on a separate non-blocking schedule while keeping the main pipeline green.

2. **Root Cause Taxonomy**:
   - **Type A: Timing & Race Conditions**: Relying on arbitrary timeouts instead of explicit event listeners or locator auto-waiting.
   - **Type B: Shared Mutable State**: Leaked database records, un-reset singleton caches, or shared browser sessions.
   - **Type C: Non-Deterministic Data**: Unseeded random numbers, floating-point rounding differences, or timezone daylight savings drift.
   - **Type D: Resource Contention**: CPU starvation in parallel CI containers leading to socket or process timeouts.

## Deflaking Checklist

- [ ] Replaced any `sleep()` or `waitForTimeout()` with `waitForSelector()` or web-first assertion.
- [ ] Swapped wall-clock timestamps for fixed frozen clock (`vi.setSystemTime`).
- [ ] Replaced shared database rows with unique UUID-tagged entity fixtures.
- [ ] Added network request mock interceptors for external third-party endpoints.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.