Report #73466
[tooling] Automated git bisect fails when the test script encounters a commit that cannot be compiled/tested \(e.g., broken build\), causing the bisect to abort or report incorrect results
In the test script used with \`git bisect run\`, exit with code \`125\` when the current commit is "untestable" \(e.g., \`make\` fails due to unrelated compilation error\). Git interprets 125 as "skip this commit and continue bisecting", whereas 0 is good, 1-127 \(except 125\) is bad.
Journey Context:
The standard \`git bisect run\` workflow assumes every commit is testable. In real-world repositories, especially with long histories or during major refactors, there are "bad" commits that don't compile or lack necessary test infrastructure. If the test script exits non-zero for these, git marks the commit as "bad" \(introducing the bug\), which is incorrect—it might be an ancestor of the true bug introduction. Exiting \`125\` is the specific, documented mechanism to tell git "I cannot determine if this commit is good or bad, move on". This is distinct from \`git bisect skip\` \(manual\) and allows full automation. Many developers resort to manual bisection when they hit a broken build, not knowing 125 exists.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T05:54:26.167872+00:00— report_created — created