Skip to content

Regression Bisect

You'll take something that used to work and broke, find the exact commit that did it, and tell the maintainer.

About

A regression report that names the commit gets fixed in a day. One that says 'it broke sometime this year' sits for months. git bisect does the finding for you: it checks out commits in a binary search and you say good or bad until it lands on the one. Twelve steps covers 4,000 commits. This badge is one real regression, bisected, reported, and ideally fixed. What doesn't count is a bug that was always there.

At a glance

Per requirement
35 XP
Completion bonus
300 XP
Requirements
5
Takes
One to three weeks
Skill level
Intermediate (months of practice)
Cost
Free
Supplies
Nothing special
Where
At home
Other people
On your own
Locked for now
Earn two more Uncommon badges in Open Source & Community to open this one. Log in to see how far along you are.

Requirements

  1. 1
    Find a regression in a project you use, with a version where it worked and a version where it doesn't. Check the issue tracker for 'worked in X, broken in Y' reports with no cause found, or hit one yourself. Confirm both versions on your own machine. Take a screenshot of the behavior on each version. Photo
  2. 2
    Write a script or a command that returns pass or fail for the bug in under a minute. Bisect runs it many times, so it has to be automatic: exit 0 for good and nonzero for bad. If the project needs a build, include the build in the script. Take a screenshot of the script and of it passing on the good version. Photo
  3. 3
    Run git bisect between the two tags and land on the first bad commit. Run git bisect start, then bad, then good, then git bisect run with your script, and go make tea. If a commit won't build, git bisect skip moves past it. Take a screenshot of the bisect output naming the commit. Photo
  4. 4
    Report the commit on the issue with the hash, the diff summary, and your script. Read the commit first and say in one sentence what it changed that could cause this. Link the commit and attach the script so they can rerun it. Take a screenshot of your comment. Photo
  5. 5
    Fix it yourself, or confirm the maintainer's fix with your script. If the fix is small and obvious, open a PR with a test. If the maintainer fixes it, run your script on their branch and say so. Take a screenshot of the merged fix or your confirmation comment. Photo