The pass-on-retry monitor detects the most common flakiness pattern: a test fails, is retried, and passes on the same commit. This indicates the failure wasn’t caused by a code change and that the test is unreliable. This monitor is branch-agnostic. It evaluates all test runs regardless of which branch they ran on.Documentation Index
Fetch the complete documentation index at: https://trunk-4cab4936-mintlify-migrate-trunk-docs-1778256504.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
How It Works
The monitor continuously scans your test runs looking for commits where a test has both a failure and a success. When it finds one, the test is flagged as flaky. Once flagged, the test remains flaky until no pass-on-retry behavior has been observed for a configurable recovery period. This prevents tests from bouncing between flaky and healthy if they only fail intermittently.Example
Your CI retries failed tests automatically. On commitabc123:
test_loginfails on the first attempttest_loginpasses on retry
test_login had both a failure and success on the same commit and flags it as flaky.
Seven days later (assuming default settings), if test_login hasn’t exhibited any more retry behavior, the monitor resolves and the test returns to healthy.
Configuration
| Setting | Description | Default |
|---|---|---|
| Enabled | Whether the monitor is active | On |
| Recovery days | Days without pass-on-retry behavior before a test is resolved as healthy. Range: 1 to 15 days. | 7 |