Show DEV: I Built a Bayesian GitHub Action to Find the Commit That Broke Your C++ Project
Description and use
BayesCI is a GitHub Action that applies Bayesian inference to pinpoint the commit that broke a C++ build by parsing compiler diagnostics and commit history.
Problem
Identify which commit caused a failed CI build for a C++ project when compiler diagnostics do not specify the culprit commit.
Outcome
In 20 synthetic failure scenarios BayesCI parsed diagnostics in 20/20 cases, placed the culprit in the top 3 in 19/20 cases, and identified the culprit as the top‑1 result in 11/20 cases.
Workflow
- 1. Configure BayesCI in the GitHub Actions workflow.
- 2. On a build failure, BayesCI reads GCC/Clang/linker/CMake diagnostics.
- 3. It enumerates commits since the last successful build and extracts changed files, symbols, lines, and build configuration.
- 4. The C Bayesian engine computes a ranking of commits based on the diagnostics.
- 5. The Python wrapper formats the results and writes them to the GitHub Actions summary.
- 6. The developer reviews the ranked list to identify the culprit commit.
Evidence
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.
I tested it on 20 synthetic failure scenarios: 20/20 — diagnostics successfully parsed; 19/20 — culprit appeared in the displayed Top 3; 11/20 — culprit was the unambiguous Top‑1 result.
BayesCI reads GCC, Clang, linker, and CMake diagnostics.
The parser is replaceable. The mathematical engine is reusable.
- Record date: 2026-10-25T14:41:14.955Z