Skip to main content

bisect

Function bisect 

Source
pub async fn bisect<S, F>(
    store: &S,
    good: CommitId,
    bad: CommitId,
    predicate: F,
) -> Result<BisectOutcome>
Expand description

Binary-searches the ancestry path between good and bad for the exact commit where predicate flips from true to false.

Contract: predicate is expected to be monotonic along the path — true for a prefix starting at good, false for a suffix ending at bad. Constructed test DAGs uphold this by design; if it doesn’t hold in practice (e.g. flaky predicate), the search still terminates in O(log n) calls but the reported boundary is only meaningful under the monotonicity assumption, exactly as with git bisect.