Show DEV: I Built a Bayesian GitHub Action to Find the Commit That Broke Your C++ Build
Hey DEV community! π
I've been experimenting with probability theory and wanted to see whether Bayes' theorem could help identify which commit caused a failed CI build .
So I built BayesCI , an open-source GitHub Action powered by a small Bayesian engine written in C, with Python handling Git analysis and compiler diagnostics.
The problem
Imagine you've made several commits, pushed your changes, and suddenly your C++ build fails:
undefined reference to `calculate_total' collect2: error: ld returned 1 exit status
Enter fullscreen mode
Exit fullscreen mode
The compiler tells you what failed, but not necessarily which commit introduced the problem.
That's what BayesCI tries to help with.
How it works
BayesCI:
Reads GCC, Clang, linker, and CMake diagnostics.
Examines commits since the last successful build.
Analyzes changed files, symbols, lines, and build configuration.
Uses Bayesian ranking to identifyβ¦