The interview problem
Design a model that recommends which failing CI tests to rerun rather than automatically dismissing failures.
Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.
1. Scope and worked approach
Use test history, runner environment and failure signatures available at decision time. Label inconsistent outcomes under controlled reruns, distinguishing code fixes from spontaneous passes. Split chronologically and by repository where appropriate; start with failure-frequency rules.
2. Trace the design or derivation
CI failure → pre-rerun features → rerun priority → controlled result → adjudicated label
Do not equate a passing retry with a safe release. Keep the original failure and environment metadata, and expire quarantine decisions. The cited engineering report motivates the phenomenon; this predictive workflow is an original design.
3. Calculate the example
Of 100 flagged failures, 70 pass on an unchanged rerun and 30 fail again. A 70% rerun-pass rate is not 70% proof of flakiness: environment changes or nondeterministic real bugs can contribute.
4. Failure cases and trade-offs
Quarantining predicted flaky tests hides regressions and changes future labels. Post-rerun information leaks into a model intended to act before rerun. Rare tests have little history.
5. Validation, follow-ups and self-review
Compare rerun cost and missed confirmed regressions in shadow mode. Follow-up: who can quarantine a test? Self-review: include decision-time features and a human-owned release gate.
Sources and related practice
Technical reference: testing.googleblog.com — First-party engineering account of flaky-test mitigation, not an interview report.
Source publication/update: May 2016. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.
Continue with Retrieve code by natural-language intent; Model drift and production monitoring.
Continue your preparation
Choose a connected learning path or browse more ML system design questions. Read our editorial method and attribution policy.