Hacker News Viewer

Show HN: Git bayesect – Bayesian Git bisection for non-deterministic bugs

by hauntsaninja on 3/28/2026, 8:32:01 PM

https://github.com/hauntsaninja/git_bayesect

Comments

by: hauntsaninja

git bisect works great for tracking down regressions, but relies on the bug presenting deterministically. But what if the bug is non-deterministic? Or worse, your behaviour was always non-deterministic, but something has changed, e.g. your tests went from somewhat flaky to very flaky.<p>In addition to the repo linked in the title, I also wrote up a little bit of the math behind it here: <a href="https:&#x2F;&#x2F;hauntsaninja.github.io&#x2F;git_bayesect.html" rel="nofollow">https:&#x2F;&#x2F;hauntsaninja.github.io&#x2F;git_bayesect.html</a>

3/28/2026, 8:59:38 PM


by: SugarReflex

I hope this comment is not out of place, but I am wondering what the application for all this is? How can this help us or what does it teach us or help us prove? I am asking out of genuine curiosity as I barely understand it but I believe it has something to do with probability.

4/1/2026, 9:03:37 PM


by: supermdguy

Okay this is really fun and mathematically satisfying. Could even be useful for tough bugs that are technically deterministic, but you might not have precise reproduction steps.<p>Does it support running a test multiple times to get a probability for a single commit instead of just pass&#x2F;fail? I guess you’d also need to take into account the number of trials to update the Beta properly.

3/28/2026, 11:06:23 PM


by: Retr0id

Super cool!<p>A related situation I was in recently was where I was trying to bisect a perf regression, but the benchmarks themselves were quite noisy, making it hard to tell whether I was looking at a &quot;good&quot; vs &quot;bad&quot; commit without repeated trials (in practice I just did repeats).<p>I could pick a threshold and use bayesect as described, but that involves throwing away information. How hard would it be to generalize this to let me plug in a raw benchmark score at each step?

4/1/2026, 7:18:08 PM


by: davidkunz

Useful for tests with LLM interactions.

4/1/2026, 7:58:25 PM