The core feature. You describe a behavior as a command & a range of commits. crux runs the command at the newest & oldest commits. Different results and it binary searches for the oldest commit where the behavior fails, then reports it.

how it works

crux reads the range with git log, reverses it into chronological order, and probes commits by checking them out & running your command. 2 probes establish that a flip exists. Binary search converges in ceil(log2(n)) more: 12 total on 1,000 commits. Every path that touches the working tree restores your original HEAD afterwards.

speedup ratio of git bisect time over fastest crux mode per scenario, red line marking parity; crux leads on 5 of 9 scenarios including a real repository

the exit code contract

The behavior target is a command. Exit 0 means the behavior holds. Anything else means it changed. That one rule is what makes crux behavior-driven instead of build-driven: a build can succeed while the behavior is broken, and crux would still find your culprit.

limits

The search assumes 1 flip that persists. Multiple flips or gradual drift break that assumption, and crux switches to ranked candidates rather than answer wrongly. Untracked files your command depends on don't exist at probe commits. Commit the harness.

edit this page