Finding the commit behind a failing test
Send GPT-5.4 the failing test output and the diffs of the last few commits, and ask which change most likely broke it. Confirm by reverting that commit on a branch and running the test again.
Example: Which commit broke this test?
Material
- Test failure
- test_invoice_total: expected 107.00, got 100.00
- Recent commits
- a1f3: rename tax_rate to vat_rate in config. b72c: update README. c9e0: add logging to invoice service.
PromptRead the test failure and the recent diffs, and say which commit most likely caused it and why.
Sample answer · written by hand to show the reasoning
Most likely a1f3. The total is missing exactly 7%, which looks like tax not being applied; if the invoice code still reads tax_rate, it now gets nothing and falls back to zero. Search for remaining references to tax_rate, then revert a1f3 on a branch and rerun the test to confirm.