flaky-triage
WAY 13 — find flaky tests across recent runs and quarantine them so they stop producing false bug reports. Use when the user says "flaky", "find flaky tests", "triage flaky", "quarantine", or after repeated unexplained failures.
- License 许可
- MIT
- 最近更新
- 2026-11-06
- Stars
- ★ 5
- Forks
- 4
01 前言 Front Matter
- name
- flaky-triage
- description
- WAY 13 — find flaky tests across recent runs and quarantine them so they stop producing false bug reports. Use when the user says "flaky", "find flaky tests", "triage flaky", "quarantine", or after repeated unexplained failures.
02 资源文件 52
- 参考文档__fixtures__/changed-during-window/runs/2026-10-01T08-00-00/results.json1.2 KB
- 参考文档__fixtures__/changed-during-window/runs/2026-10-02T08-00-00/results.json1.2 KB
- 参考文档__fixtures__/changed-during-window/runs/2026-10-03T08-00-00/results.json1.2 KB
- 其他__fixtures__/changed-during-window/test-cases/demo/feature-edited.feature41 B
- 其他__fixtures__/changed-during-window/test-cases/demo/steps-edited.feature39 B
- 脚本__fixtures__/changed-during-window/test-cases/demo/steps-edited.steps.ts35 B
- 其他__fixtures__/changed-during-window/test-cases/demo/untouched.feature36 B
- 脚本__fixtures__/changed-during-window/test-cases/demo/untouched.steps.ts35 B
- 参考文档__fixtures__/consistent-fail/runs/2026-10-01T08-00-00/results.json689 B
- 参考文档__fixtures__/consistent-fail/runs/2026-10-02T08-00-00/results.json689 B
- 参考文档__fixtures__/consistent-fail/runs/2026-10-03T08-00-00/results.json689 B
- 参考文档__fixtures__/consistent-fail/runs/2026-10-04T08-00-00/results.json81 B
- 参考文档__fixtures__/flaky/runs/2026-10-01T08-00-00/results.json670 B
- 参考文档__fixtures__/flaky/runs/2026-10-02T08-00-00/results.json844 B
- 参考文档__fixtures__/flaky/runs/2026-10-03T08-00-00/results.json670 B
- 参考文档__fixtures__/flip-rate/runs/2026-10-01T08-00-00/results.json523 B
- 参考文档__fixtures__/flip-rate/runs/2026-10-02T08-00-00/results.json894 B
- 参考文档__fixtures__/flip-rate/runs/2026-10-03T08-00-00/results.json1.2 KB
- 参考文档__fixtures__/flip-rate/runs/2026-10-04T08-00-00/results.json894 B
- 参考文档__fixtures__/insufficient-data/runs/2026-10-01T08-00-00/results.json531 B
- 参考文档__fixtures__/insufficient-data/runs/2026-10-02T08-00-00/results.json906 B
- 参考文档__fixtures__/insufficient-data/runs/2026-10-03T08-00-00/results.json1.0 KB
- 参考文档__fixtures__/malformed/runs/2026-10-01T08-00-00/results.json68 B
- 参考文档__fixtures__/network/runs/2026-10-01T08-00-00/results.json1.1 KB
- 参考文档__fixtures__/network/runs/2026-10-02T08-00-00/results.json1.3 KB
- 参考文档__fixtures__/network/runs/2026-10-03T08-00-00/results.json1.1 KB
- 参考文档__fixtures__/network/runs/2026-10-04T08-00-00/results.json713 B
- 参考文档__fixtures__/no-baseline/runs/2026-10-01T08-00-00/results.json944 B
- 参考文档__fixtures__/no-baseline/runs/2026-10-02T08-00-00/results.json1.3 KB
- 参考文档__fixtures__/no-baseline/runs/2026-10-03T08-00-00/results.json944 B
- 参考文档__fixtures__/no-baseline/runs/2026-10-04T08-00-00/results.json543 B
- 参考文档__fixtures__/stable-pass/runs/2026-10-01T08-00-00/results.json529 B
- 参考文档__fixtures__/stable-pass/runs/2026-10-02T08-00-00/results.json529 B
- 参考文档__fixtures__/stable-pass/runs/2026-10-03T08-00-00/results.json529 B
- 参考文档__fixtures__/stable-pass/runs/2026-10-04T08-00-00/results.json530 B
- 参考文档__fixtures__/unquarantine/runs/2026-10-01T08-00-00/results.json1.4 KB
- 参考文档__fixtures__/unquarantine/runs/2026-10-02T08-00-00/results.json1.9 KB
- 参考文档__fixtures__/unquarantine/runs/2026-10-03T08-00-00/results.json1.9 KB
- 参考文档__fixtures__/unquarantine/runs/2026-10-04T08-00-00/results.json1.9 KB
- 参考文档__fixtures__/unquarantine/runs/2026-10-05T08-00-00/results.json2.0 KB
- 参考文档__fixtures__/unquarantine/runs/2026-10-06T08-00-00/results.json1.9 KB
- 参考文档__fixtures__/unquarantine/runs/2026-10-07T08-00-00/results.json1.9 KB
- 参考文档__fixtures__/unquarantine/runs/2026-10-08T08-00-00/results.json1.9 KB
- 参考文档__fixtures__/unquarantine/runs/2026-10-09T08-00-00/results.json1.9 KB
- 参考文档__fixtures__/unquarantine/runs/2026-10-10T08-00-00/results.json1.9 KB
- 参考文档__fixtures__/window/runs/run-a/results.json521 B
- 参考文档__fixtures__/window/runs/run-b/results.json521 B
- 参考文档__fixtures__/window/runs/run-c/results.json521 B
- 参考文档__fixtures__/window/runs/run-d/results.json683 B
- 参考文档__fixtures__/window/runs/run-e/results.json683 B
- 脚本flaky.mjs4.0 KB
- 脚本flaky.test.mjs6.3 KB
03 SKILL.md 正文
WAY 13 — Flaky Test Triage
Phase 1: Aggregate
From the directory containing playwright.config.ts (normally qa-artifacts/):
node "${CLAUDE_PLUGIN_ROOT}/.claude/skills/flaky-triage/flaky.mjs" runs <window=10> .
The script reads the last N runs/*/results.json and prints, per scenario: its outcome history, flips, flip rate, a verdict (flaky | consistent-fail | stable-pass | insufficient-data), changedDuringWindow (the .feature/.steps.ts changed after the window started), and unquarantine (a quarantined test with 10 straight passes). Outcomes that say nothing about stability are excluded from the counts: no-baseline (first visual run) and network.
If there are fewer than 3 runs, say so and suggest scheduling e2e-session runs (or ci-test-setup) first.
Phase 2: Judge (don't just trust the flip rate)
For each flaky scenario, read the error messages in its history:
- Same error each time it fails (timing, a race, animation) → real flakiness. Propose quarantine
- Different errors → the app or data was changing between runs, not flakiness. Leave it alone
changedDuringWindow: true→ the flips may be your own edits. Re-run triage after a few stable runsconsistent-failisn't flaky. It's a real failure: point toe2e-session/bug-report
Phase 3: Quarantine (with the user's approval, per test)
- Add
@quarantineto the scenario's tag line in its.feature(keep the watermark header) - File an issue labeled
flaky-test(issue.create) with the history table, the suspected cause, and a fix suggestion (a wait-for condition instead of a timeout, test data isolation, disabling animations). This is a test issue, not a product bug - Quarantined tests keep running. Callers just don't file bugs for them (
quarantined: truein results), so triage can see when they stabilize
Unquarantine: for every unquarantine: true scenario, propose removing the tag and closing its flaky-test issue.
Phase 4: Report
Save ./qa-artifacts/sessions/flaky-<YYYY-MM-DD>.md (with the watermark footer): a table of scenario · history · flip rate · verdict · action, plus the totals.
04 同仓库更多 Skills
write-tests
WAY 4 — write test cases only, no execution. Use when the user says "write it", "write tests", "generate test cases" — an approved test plan (`Plan:`), or requirements (text or a tracker issue) planned and approved first, optional App/Spec/MR or PR → exactly the planned test files.
verify-fix
WAY 9 — verify that a bug is fixed by running its regression test. Use when the user says "verify it", "verify fix", "is #142 fixed", "check the fix" with one or more bug refs (#142, SHOP-142), or "verify all" for every open bug that has a regression test.
user-story-format
Reference only — the single definition of this project's user-story body (story, Gherkin ACs, Missing Information, DoD) and its AC/scenario rules. Read by user-story-enhancer (WAY 6) and benchmark-gap-story-writer (WAY 8) so stories they write stay identical in shape and WAY 6 can re-score WAY 8's output. Not a workflow on its own.
tracker
Provider-neutral contract for every issue-tracker and code-host action (create/update/comment/close issues, attach files, comment on MRs/PRs, read CI runs and logs) plus label conventions and failure handling. Every WAY calls these operations; the matching provider-* skill says how to perform them on GitLab, GitHub, Jira, Azure DevOps, or Bitbucket.
traceability
WAY 14 — requirements traceability matrix for a user story (each acceptance criterion) or a test folder written from plain text (each R-NN requirement) → the tests covering it → their latest result → open bugs. Use when the user says "trace it", "traceability", "is #148 covered", "coverage of SHOP-148", "trace it <folder>".
test-plan
WAY 19 — design a test plan before any test code. Use when the user says "plan it", "plan tests", "test plan", "design tests" with requirements (text or a tracker issue), optional App/Spec/MR or PR. Output is the test plan (scope, levels, one row per Test#<nn> with category, tags, covers, priority, coverage, entry/exit criteria, risks), reviewed by `review-plan` (WAY 20), filed for approval; `write it Plan:` / `e2e it Plan:` then write exactly that plan. Also holds the plan format every other WAY reads.