Reference catalog of the eight flake patterns - async/timing, test ordering, shared parallel state, resource leaks, network, locator drift, environment variance, randomness - with detection heuristics, remediation per pattern, and the concrete code-level fixes: replacing fixed sleeps with framework auto-waits, isolating state in beforeEach fixtures, per-worker DB schemas via workerIndex, try/finally teardown, mocking network + clock at the boundary, stable role-based locators, TZ pinning, and RNG seeding. Use when triaging an unknown flake to identify the category before bisecting, or when a classified flake needs the specific code change to apply.
98
91%
Does it follow best practices?
Impact
99%
1.07xAverage score across 10 eval scenarios
Passed
No findings from the security scan
Deliverables present and green
100%
100%
Every archive call is awaited
100%
100%
No sleep, poll, or retry left in the file
100%
100%
Diagnosis names the unawaited operation
100%
100%
Source and assertions untouched
100%
100%
Cross-test contamination explained, not just suppressed
100%
100%
Review rule stated
100%
100%
Suite passes with all five tests intact
100%
100%
Each test builds its own cart
100%
100%
Diagnosis names in-place mutation of a shared fixture
0%
100%
Expected values untouched
100%
100%
No retry, reorder, or quarantine as the fix
100%
100%
Production source unchanged
100%
100%
Result is order-independent
100%
100%
Forward rule stated
0%
100%
Deliverables present and green
100%
100%
Tests run against a fixed instant, not the ambient clock
71%
92%
Fixture and expectation share one frame of reference
83%
100%
Notes name the ambient clock as the shared cause
90%
100%
No skip, retry, or tolerance widening
100%
100%
Production source unchanged
100%
100%
Boundary is now covered rather than avoided
40%
100%
Forward rule stated
75%
100%
Deliverables present and green
100%
100%
Assertions gated on the completion signal
100%
100%
No longer wait, retry, or timeout bump
100%
100%
Write-up names the fixed-duration wait as the mechanism
100%
100%
Explains why a longer wait is not the fix
100%
100%
Source and assertions untouched
100%
100%
Suite is not slower than the work it measures
100%
100%
Deliverables present and green
100%
100%
Test data is reproducible run to run
100%
100%
Generated data respects the documented contract
100%
85%
Report names uncontrolled test data as the single cause
100%
100%
No retry, rerun, or quarantine as the fix
100%
100%
Assertions kept at full strength
100%
100%
Production source unchanged
100%
100%
Review rule stated
100%
100%
Deliverables present and green
100%
100%
Each file binds a port the OS assigns
100%
100%
No serialisation, retry, or quarantine as the fix
100%
100%
Notes name the contended resource and read the evidence
100%
100%
Servers are still shut down
100%
100%
Source and assertions untouched
100%
100%
Rule stated for the next file
100%
100%
Deliverables present and green
100%
100%
Assertions no longer depend on position
100%
100%
Coverage preserved
100%
100%
Diagnosis names the arbitrary result order
100%
100%
No wait, retry, or serialisation as the fix
100%
100%
Production source unchanged
100%
100%
Rule stated for future assertions
100%
100%
Deliverables present and green
100%
100%
Every test arranges its own precondition
100%
100%
Leftover session state is cleared between tests
50%
100%
Notes name the implicit precondition dependency
100%
100%
No quarantine, retry, or enforced ordering as the fix
100%
100%
Production source unchanged
100%
100%
Assertions still describe their own scenario
100%
100%
Forward rule stated
100%
100%
Deliverables present and green
100%
100%
The replacement is undone after the test that installs it
100%
100%
Diagnosis names the unrestored global replacement
100%
100%
Assertions kept at full strength
100%
100%
No reorder, retry, or quarantine as the fix
100%
100%
Source unchanged
100%
100%
The first test still pins the time it needs
100%
100%
Rule stated for the next test
100%
100%
Deliverables present and green
50%
100%
Every acquired connection is returned
100%
100%
Release survives a failing test
100%
100%
The file proves it leaves nothing checked out
100%
100%
Notes name the unreturned resource and the position effect
0%
100%
No raised limit, retry, or file split as the fix
100%
100%
Source unchanged
100%
100%
Table of Contents