失敗の二分探索 (Bisecting a Failure) とは?
失敗の二分探索は、バグを導入したコミットを特定するために、コミットの範囲を二分探索する手法です。既知の正常なコミットと既知の異常なコミットをマークし、中間点をテストして結果に基づいて範囲の半分を捨て、原因が1つに絞られるまで繰り返します。git bisectはその記録管理を自動化します。
なぜ重要か
リグレッションが数百のコミットのどこかに現れたとき、1つずつ確認するのは絶望的ですが、二分探索は対数回のテストで原因を見つけます。テストステップを自動化すれば、CIは無人で二分探索できます。この手法は正常から異常へのクリーンな遷移を前提とするため、間欠的または不安定な失敗は誤った結果を招くことがあります。
関連ガイド
What Is a Test Retry Budget?A test retry budget caps how many automatic retries a CI run may use to mask flaky failures, preventing retri…
What Is a Quarantine List?A quarantine list is the set of known-flaky tests moved out of the blocking suite so they no longer fail buil…
What Is Build Reproducibility?Build reproducibility is the property that building the same source in the same environment yields a bit-for-…