Bisect a Driver Regression Across Commits With a Flaky Test

Last updated: November 29, 2026

Quick Overview

Given an ordered list of commits where the first is known good and the last is known bad, and a test that sometimes fails on good commits and sometimes passes on bad ones, find the first bad commit while keeping the number of test runs low.

NVIDIA
Software Engineering Fundamentals
Software Engineer
NVIDIA
November 29, 2026
Software Engineer
Onsite
Software Engineering Fundamentals
Medium

0

0

0 solved


Given an ordered list of commits where the first is known good and the last is known bad, and a test that sometimes fails on good commits and sometimes passes on bad ones, find the first bad commit while keeping the number of test runs low.

A testing and debugging question at NVIDIA for driver and CUDA toolkit teams, where nightly perf and correctness suites run across many GPU SKUs and a test can be noisy because of clocks, thermals or race conditions. The interviewer checks bisection invariants, how you deal with noise statistically, and what you would do in the real CI setup.

What the Interviewer Expects
  • Maintains the invariant lo is good and hi is bad throughout
  • Repeats the test per commit and decides by failure rate against a threshold
  • Caches verdicts so no commit is tested twice
  • Reasons about choosing trials and threshold from the flake rates
  • Describes making the test deterministic as the real fix
Key Topics to Cover
debugging
binary search
flaky tests
regression triage
statistics
How to Approach This
  1. Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
  2. Choose data structures based on access patterns, not familiarity.
  3. Prefer immutable data and message passing over shared mutable state for concurrency.
  4. Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
  • How do you pick the number of trials given a 10% false-failure rate and 85% true-failure rate?
  • What if the regression is in performance, measured in milliseconds, not pass or fail?
  • How would you bisect when some commits in the range do not build?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Inputs: commits (ordered), run_test(commit) -> bool that returns True on pass, trials and fail_threshold. Assumption: there is a single first bad commit and everything after it stays bad. Outp...

High-Level Design

Classic bisection with a noisy oracle. Each probe runs the test trials times and calls the commit bad if the failure fraction meets the threshold. With a good-commit flake rate of 10% and a bad-comm...


Submit Your Answer
Markdown supported