Skill: flaky test quarantine protocol

A quarantine protocol skill to isolate flaky tests, track them, and force fix-or-delete decisions.

Published 2026-11-09 · Translation: VI

What to do first

  • No arbitrary sleep / wait increases as a “fix.”
  • Quarantine requires owner, ticket, and expiry: or it does not ship.
  • Prefer root-cause class (race, shared state, time, network) over deleting asserts.

Flaky tests train the team to ignore CI. Agents make it worse by padding waits, skipping whole files, or deleting the assertion that caught a real bug. Green builds that lie are worse than red builds that tell the truth.

This skill gives a protocol: confirm flake → reproduce notes → cause class → narrow quarantine with tracking → fix or delete by a date. Use it when CI flickers or someone asks to “just silence it.”

Part 1: Confirm before you quarantine

Confirm Flake

Confirm Flake

Suspected flake: [test id / file]
CI logs: [links or paste]

1. Estimate failure rate from recent runs (or mark UNKNOWN).
2. Attempt reproduction notes: seed, parallelism, order, environment.
3. Name a cause class: time | order | network | shared fixture | unknown.
Do not quarantine the whole suite. Do not add sleep as a fix.

Part 2: Quarantine card with expiry

Quarantine Card

Quarantine Card

If quarantining, emit a quarantine card:
- Test id
- Owner
- Ticket URL
- Expiry date
- Cause class
- CI impact (why not leave it red)
- Next action: FIX PLAN or DELETE RATIONALE
Refuse quarantine if owner or expiry is missing.

Part 3: Fake-fix traps

Fake Fix Traps

Fake Fix Traps

Read the board. Each card is a stop rule the skill must encode.

Save it as a skill file

# Skill: flaky-quarantine
## When
- Intermittent CI failures; ask to skip/mute/quarantine a test
## Hard rules
1. No sleep-as-fix.
2. Owner + ticket + expiry required to quarantine.
3. Narrow quarantine only: never whole-suite greenwash.
4. Prefer fix root cause; deleting asserts needs rationale.
## Steps
1. Confirm flake + reproduce notes + cause class.
2. Quarantine card or fix immediately.
3. Set review date; escalate if still quarantined past expiry.
## Done when
- Tracked quarantine + next action, or fix landed.

Test before you trust it

  1. “Just skip it.” Pass: demands owner/expiry.
  2. Order-dependent suite. Pass: mentions isolation.
  3. Obsolete test. Pass: allows delete with rationale.

Related UI state discipline: design QA. Skill format: write Cursor skills.

Common mistakes

  • Quarantining to land an unrelated feature. Track the flake; do not hide it inside the feature PR without a card.
  • Expiry in “two weeks” with no calendar date. Use an ISO date.
  • Re-enabling without fixing. That is how flakes become culture.

You are done when CI noise has an owner and a deadline, not a longer sleep.

Share

X Facebook LinkedIn