Urgent.News

What's breaking now, across thousands of outlets.

Tech

git bisect run named the wrong commit 10 out of 10 times — so I gave every commit its own clean room

git bisect run is the right algorithm. What I did not expect is how confidently it lies when you leave it running unattended. I generated a 255-commit Python history in which a dependency pin ( pytz ) moves from 2022.1 to 2023.3 at commit 150, together with the golden value of the failing test. Each commit's test is right under its own pin and wrong under the other. A real bug is planted at…

At first glance, git bisect run appears to be a reliable algorithm; however, the author discovered that it consistently makes incorrect judgments when the searched range contains a moving dependency pin. This was demonstrated through an artificial repository with 255 commits, where a dependency (pytz) shifted from version 2022.1 to 2023.3 at commit 150, accompanied by a failing test.

The test corrected itself at commit 173, which was the planted commit with a bug. When the author ran git bisect run on this repository ten times, all results were wrong, indicating that git bisect trusts a single environment for every commit. This flaw allows a moving pin to lead the search into the wrong half, resulting in false positive convictions.

The author concludes that to avoid such issues, each suspect commit should have its own clean environment for testing.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How I Actually Prove an Offline App Is Offline (Not Just Trust the Marketing)

"Runs offline" is the easiest claim in software to make and one of the least frequently checked. I build an offline AI app, so I'm on the hook for the claim — here's the testing I actually run, which…

  • Disable network adapter completely, not just turn off Wi-Fi
  • Monitor filesystem for app activity using Process Monitor (Windows) or fsusage (macOS)
  • Search entire machine for app traces, aim for zero results

Spec-Driven Development: Who Executes a Spec? (Part 4 of 4)

This is the fourth and final part of my attempt at a definition of spec-driven development (SDD), following part 1 , part 2 , and part 3 .

  • Spec dictates testable behavior, not how or why
  • Continuous spec existence drives development process
  • AI coding agents autonomously translate spec to code

More from Thursday 15 October →