Browse Engineering journal
Engineering practice

Teach Git to recognise the failure

On this page

A bisection can confidently identify the wrong change when its test confuses an old build failure with the regression.

Developer Productivity & Tooling · Dec 4, 2026 · 2 min read

An exported calendar entry loses its time zone somewhere in six months of changes. The current test suite also needs a newer compiler than some of those revisions support. Running the entire suite during bisection gives every failure the same meaning. That makes a compiler transition a plausible answer to the wrong question.

Write a three-outcome probe

Keep a small fixture and an external test script outside the checkout. Have the script build the exporter and run it on the fixture. Compare the decoded calendar field against the expected zone. Return zero for preserved, one for lost, and 125 when that revision cannot run the probe. Git reserves 125 for an untestable revision during bisect run. A conventional command-not-found result of 127 falls in Git’s bad range, so verify the test harness itself before starting. Git’s bisect run exit status contract.

Check your two claims

Run the exact probe on the known-good and known-bad revisions in a clean worktree. A changed locale, missing fixture or machine-specific time zone can otherwise turn a deterministic regression into an unreliable predicate. Pin those inputs. Save the output as well as the exit status so another engineer can understand the classification.

After the search, inspect the reported revision and its relevant parent. Repeat the same probe on both. If skipped commits surround the transition, preserve the candidate set in the bug report. If the regression was introduced, fixed and later introduced again, a search between two endpoints may locate only one transition. State the interval and the behaviour the probe actually measured.

Who crossed the validation split?Test a ticket classifier against a new customer, a new week and a repeated incident. Each split answers a different question.Where to draw a service boundaryFollow a seat reservation through two concurrent requests before deciding which components should deploy independently.

Search ObjectFAQ