/qa-flake-triage:flaky-test-quarantinefrom qa-flake-triage
Builds a quarantine workflow for flaky tests by marking with skip/fixme/retry annotations, recording failure rate and bisect link, setting auto-expiry, and producing a CI report of expired quarantines.
Ships in qa-flake-triage. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A "flaky test" is a test that produces inconsistent pass/fail results across runs without an underlying code change (google-flaky). Industry consensus from Google Testing Blog and similar practitioner-engineering sources is that flaky tests should be isolated from the gating path rather than left to mask real regressions or be silently ignored (google-flaky).
Terminology note: "flaky test" is a practitioner-emergent term popularized by the Google Testing Blog. ISTQB does not maintain a canonical entry for it. This skill cites industry-engineering sources, not ISTQB authority.
Re-evaluate by date (Step 2) - this is the
load-bearing, machine-parseable part.Re-evaluate by date (Step 3).If the test fails 100% of the time after a code change, it's a regression - bisect to the introducing commit and fix, do not quarantine.
Test tests/checkout.spec.ts:42 fails about 12% of runs on the
tablet-768 project in CI. An unrelated feature PR is blocked by it.
test.fixme() carrying the full
record (Steps 1 and 2):test('checkout flow flaky test', async ({ page }) => {
test.fixme(
true,
'Quarantined 2026-07-20 (#1234) - fails ~12% of runs on tablet-768; bisect inconclusive. Re-evaluate by 2026-08-19. Owner: @web-platform.',
);
// ... test body, no longer runs
});
Re-evaluate by 2026-08-19 in the annotation. The PR merges the same
day, unblocked.test.fixme annotation. On the first Monday after 2026-08-19 it
prints EXPIRED for this entry and opens a tracking issue.tablet-768 layout race has since landed, so
remove test.fixme(), re-run the test at depth to confirm it is
green, and close the issue. Had it still failed, renew once with an
updated annotation - never past two consecutive renewals.test.fixme() is the canonical Playwright primitive for "this test is
broken; do not run past this point" (pw-test):
test('checkout flow flaky test', async ({ page }) => {
test.fixme(
true,
'Quarantined 2026-05-04 (#1234) - fails ~12% of runs on tablet-768; bisect inconclusive. Re-evaluate by 2026-06-04.',
);
// ... test body, no longer runs
});
test.fixme(condition, description) skips with the description
visible in the report. Unlike test.skip(), fixme carries the
explicit "this needs to be fixed" intent (pw-test).
If the goal is to allow retries before quarantining, use the
retries config first (pw-retries):
// playwright.config.ts
export default defineConfig({
retries: process.env.CI ? 2 : 0,
});
A test that passes on retry is reported with the flaky status
(distinct from passed and failed); track these separately -
flaky-but-passing tests are quarantine candidates, not yet
quarantined (pw-retries).
Cypress configures retries at the suite level via
Cypress.config('retries', { runMode: 2, openMode: 0 }). For
quarantining individual specs, use it.skip(...) or the
cypress-grep plugin's
tagging convention.
test.skip(...) and test.todo(...) are the canonical primitives.
For periodic auto-evaluation, use test.skip.if(condition) patterns or
introduce a project-specific tagging convention parsed by your CI.
JUnit 5: @Disabled("Quarantined 2026-05-04 (#1234) - ...").
TestNG: @Test(enabled = false, description = "...").
For per-method retries before quarantine, JUnit 5's @RetryingTest(N)
extension and TestNG's @Test(retryAnalyzer = ...).
The annotation body is the load-bearing part of the workflow. Every quarantine record carries:
| Field | Required | Format |
|---|---|---|
| Date | yes | YYYY-MM-DD of the quarantine. |
| Issue link | yes | #1234 or full URL - links a tracked ticket. |
| Failure rate | yes | ~12% of runs - measured, not guessed. |
| Bisect status | yes | bisect inconclusive / bisected to commit abc1234 / not yet bisected. |
| Re-evaluate by | yes | YYYY-MM-DD - the auto-expiry date. |
| Owner | optional | @team-handle for routing. |
The format is parseable by the re-evaluation report (Step 4):
Quarantined 2026-05-04 (#1234) - fails ~12% of runs on tablet-768;
bisect inconclusive. Re-evaluate by 2026-06-04. Owner: @web-platform.
Default TTL: 30 days. Picked because:
Adjust per project:
A scheduled CI job greps every quarantine annotation, extracts the
Re-evaluate by date, and lists the entries that have expired - then
opens a tracking issue (or posts to Slack) per expired entry. Because the
Step 2 format is machine-parseable, the whole report is a short grep.
The Bash report script and the scheduled GitHub Actions workflow are in
references/ci-quarantine-report.md.
When a re-evaluation expires, the team has three options:
| Outcome | Action |
|---|---|
| Underlying issue fixed | Remove test.fixme() and re-run; close the issue. |
| Underlying issue still present | Renew the quarantine for one more TTL with updated annotation; never more than two consecutive renewals - at that point, delete the test or rewrite it. |
| The test is no longer relevant | Delete the test outright; close the issue. |
The two-renewal cap is the lever that prevents quarantine from becoming a permanent dead-letter. Past two renewals, the team has either lost interest in the assertion or the test is fundamentally unfixable - both signal "delete."
test.fixme() / test.skip() /
test.fail() API.flaky
status reporting.flake-pattern-reference -
catalog of flake patterns to consult during bisect.evals/brand-new-test-blocking-its-own-pr/criteria.json (opens in a new tab)evals/brand-new-test-blocking-its-own-pr/task.md (opens in a new tab)evals/deletion-pr-review/criteria.json (opens in a new tab)evals/deletion-pr-review/task.md (opens in a new tab)evals/disabled-annotations-audit/criteria.json (opens in a new tab)evals/disabled-annotations-audit/task.md (opens in a new tab)evals/intermittent-capture-failure/criteria.json (opens in a new tab)evals/intermittent-capture-failure/task.md (opens in a new tab)evals/nothing-tells-us-when-to-look-again/criteria.json (opens in a new tab)evals/nothing-tells-us-when-to-look-again/task.md (opens in a new tab)evals/retry-everything-directive/criteria.json (opens in a new tab)evals/retry-everything-directive/task.md (opens in a new tab)evals/rotted-skip-list-review/criteria.json (opens in a new tab)evals/rotted-skip-list-review/task.md (opens in a new tab)evals/six-red-tests-before-branch-cut/criteria.json (opens in a new tab)evals/six-red-tests-before-branch-cut/task.md (opens in a new tab)evals/standup-anecdotes-vs-run-history/criteria.json (opens in a new tab)evals/standup-anecdotes-vs-run-history/task.md (opens in a new tab)evals/unowned-entries-routing/criteria.json (opens in a new tab)evals/unowned-entries-routing/task.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/flake-axis-bisectionUse when one test is known to fail intermittently and reading its code has not explained why. Varies one condition at a time (isolation, order, workers, viewport, latency, repetition), counts passes and failures with confidence intervals, and walks shared resources once parallelism is implicated./flake-dashboard-authorUse for any question or task about tracking flaky-test rates or test reliability over time, including a weekly or monthly test-health report for management: a flake-rate metric from CI history (JUnit XML or JSON), a Grafana panel or Datadog CI Visibility view, the quarantine-candidate query, trend alerts and the report for Slack or a wiki./npx claudepluginhub testland/qa --plugin qa-flake-triageOther plugins' skills for the same job