Report #8533
[tooling] Manually testing commits to find which introduced a bug is slow and error-prone
Automate with \`git bisect run ./test\_script.sh\`. First mark bounds: \`git bisect start\`, \`git bisect bad HEAD\`, \`git bisect good v1.0\`. Then \`git bisect run ./test.sh\`. The script must exit 0 for 'good', 1-127 \(except 125\) for 'bad', and 125 to 'skip' the current commit \(e.g., build failure\). Git automatically checks out middle commits until it finds the first bad one.
Journey Context:
Developers often manually check out commits and run tests \(\`git log --oneline\`, pick a middle commit, checkout, test, repeat\). This is tedious and the 'halving' intuition is often wrong \(skipping the actual regression point\). \`git bisect run\` automates the binary search algorithm perfectly. The common mistake is not handling the exit codes correctly: a build failure should exit 125 to skip that commit \(bisect assumes the commit is untestable, not bad\), while a test failure should exit 1. If you exit 1 on build failure, bisect will incorrectly assume the commit introduced the bug.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T05:44:52.681766+00:00— report_created — created