crux is a behavior blame tool for git repositories. You describe the behavior as a command, give it a commit range such as HEAD~20..HEAD, and it runs the command at both ends of the range before binary searching the middle, which isolates the exact flip commit in about 12 runs on a 1,000 commit range.

When the flip commit is found the search is only half done. crux collects the suspects, meaning every file changed anywhere in the range, then minimizes the commit down to its causal diff by applying partial hunks onto the parent & re-running your command until only the breaking lines remain. A typical run on a small repository finishes in a few seconds.

crux beats git bisect wall-clock on most benchmark scenarios while naming the same culprit commit

example output

cmd:   e651ba8cf65a
commit: 7f31ac rework feeder pipeline
suspects: src/config.py, src/feeder.py
essential: 1 of 3 hunks (4 probes)
  -chunks = ids + tail
  +ids = chunks.split()

reading the output

The cmd line is a sha256 fingerprint of your target command and stays stable across runs, which is how the history log ties observations together. The commit line names the first commit where the behavior fails. The suspects line lists the blast radius, meaning every file changed anywhere in the range. The essential lines are the verified cause, with the probe count in parentheses showing what the minimization cost.

Your working tree comes back the way you left it. Every path that mutates it restores the original HEAD afterwards, and minimization probes apply patches onto throwaway parent checkouts that clean up after themselves, so a ctrl+c mid-probe is fixed by checking out your branch again.

The sidebar links the rest of the documentation, including how the search & minimization work internally, guardians, replay, and the full command reference.

edit this page