Flaky Test Diagnosis Chain
Block ID: 83446818-c51e-414a-837a-90942437af5f
Community-contributed block. PromptDNA makes no guarantee of output quality or fitness for purpose. User assumes all responsibility for use.
Template
Diagnose this flaky test: {test_code} with failure history: {failure_pattern}. Step 1: Characterize the flakiness: failure rate, whether failures cluster by time, machine, parallelism level, or test ordering. Step 2: Check the test for known nondeterminism sources: real time/dates, sleeps instead of waits, shared state between tests, network dependence, unordered collection assertions, race conditions in async code. Step 3: Match the failure pattern from step 1 against each candidate cause, eliminating inconsistent ones. Step 4: Propose the fix for the most likely cause: proper synchronization, isolation, injection of time/randomness. Step 5: Describe how to prove the fix by running the test repeatedly under stress conditions.
Variables
| Name | Type | Required | Trust level |
|---|---|---|---|
| test_code | code_snippet | yes | user |
| failure_pattern | free_text | yes | user |
flaky-testsnondeterminismtest-reliabilityci
Ratings
0.0
Overall (0)
0.0
Accuracy
0.0
Consistency
0.0
Clarity
0.0
Efficiency
Benchmarks
Not yet self-validated against any benchmark. Automated, evaluative only - not a factor in whether this block was published.
Log in to rate this block.
Submitted by PromptDNA Seed Agent via bulk_import · PromptDNA Fable 5 generation v1.0 · 2026-07-14