TECHDEV Β· Flagship Β· Open-source tool

ci-failure-detective

Your CI failed. Was it a real break, or just a flake? And where exactly did it break? CI Failure Detective reads a failed CI log and answers three questions: what the first real error was, whether each failing test is flaky or genuinely broken, and whether this exact failure happened before.

GitHub Action + CLI (cifd) Β· v0.1.0 Β· Zero dependencies Β· Node 18+ Β· MIT Β· Runs entirely inside your runner β€” no logs ever leave your repo, no signup, no SaaS bill.

What it tells you

QuestionHow
Where did it actually break?First error line + stack context, classified (test / compile / dependency / OOM / timeout / lint)
Flaky or real?Verdict per test β€” flaky, real, or unknown β€” with a confidence score, based on run history
Seen this before?Stable 12-char failure signature; repeats are clustered with first/last seen dates
What should I do?Suggested actions only β€” quarantine hints, retry guidance, first-error pointer. Nothing is ever applied automatically

Suggested next steps are advisory only β€” nothing is applied automatically. Quarantine stays suggest-only by design: automatically retrying or silencing failures hides real bugs.

How a flaky verdict is decided

Flaky detection needs history: commit .cifd-history.jsonl in your repo and append each run. Same-commit verdicts need per-test pass records, so run tests verbose (jest --verbose, pytest -v) so passing tests are visible in the log. Plain (non-verbose) logs only record failures, so same-commit evidence is unavailable from them β€” flip-rate and regression verdicts still work.

Supported frameworks β€” and any raw log

Test-result parsing: Jest, pytest, go test, Mocha (best-effort β€” the best-matching parser wins). But you do not need a test framework at all: failure classification and first-error extraction work on any raw log β€” npm/pip/go install failures, tsc errors, Docker build failures, OOM kills.

Use it

# As a GitHub Action (recommended) β€” add one step after your test command
- name: Run tests
  run: npm test 2>&1 | tee ci.log

- name: Diagnose failures
  if: failure()
  uses: techdevfun/ci-failure-detective@v1
  with:
    log-file: ci.log
# As a CLI β€” zero dependencies, Node.js 18+
npx ci-failure-detective analyze ci.log
cifd analyze ci.log --format md >> $GITHUB_STEP_SUMMARY

# Pipe a live run straight into the report
npm test 2>&1 | tee ci.log | npx ci-failure-detective analyze --format md
# Record history, then show failure clusters
cifd record --history .cifd-history.jsonl --commit $GITHUB_SHA < ci.log
cifd history   # show failure clusters

Commands copied exactly from the ci-failure-detective README (v0.1.0). The README shows these npx / CLI commands and the @v1 Action step; it does not state a separate npm-install step, so none is claimed here.

Action inputs and outputs

InputDefaultDescription
log-fileβ€”Path to the CI log (required)
history-file.cifd-history.jsonlRun-history file
commit$GITHUB_SHACommit SHA for flaky scoring
fail-on-realfalseExit 1 when verdict is real-failure
summarytrueAppend markdown report to $GITHUB_STEP_SUMMARY

Outputs: verdict, signature, report-json.

CLI reference

cifd analyze [logfile] [--format json|md] [--history FILE] [--commit SHA]
cifd record --commit SHA [--history FILE] < logfile
cifd history [--history FILE]

Example output (README demo, not a benchmark)

The README's worked example is a flaky Jest verdict, recorded from a real terminal session on the repo's own fixture logs. It is shown here as an example of the report format β€” not as measured performance:

The README contains no latency, accuracy-benchmark, or test-count figures, so none are claimed on this page. The demo also shows an infra verdict for a failed npm install and the failure-cluster history.

What this is NOT β€” and where rivals beat us

As the README states it: CI Failure Detective is the only zero-dependency GitHub Action + CLI that does all three β€” cluster repeat failures, separate flaky from real, point at the first error β€” without any byte of your log leaving the runner.

Source + README on GitHub β†’ Β· Report an issue β†’ Β· ask@techdev.fun

Limits and roadmap

Limits stated in the README: flaky detection needs run history (without it, verdicts are unknown); same-commit verdicts need verbose logs; framework parsing is best-effort. Nothing is ever applied automatically.

Roadmap β€” not shipped features: JUnit XML as an additional input (alongside raw logs); Slack webhook output; more frameworks (PHPUnit, RSpec, .NET); SARIF output for code scanning integration.

Related tools

More open-source tools from TECHDEV: sessguard, runverdict, gheist-guard, vetgate, context-diet, agent-seatbelt, devsecops-os, env-doctor, skill-audit, logtrim, testguard, breakcheck, keymap, memgraph, ggufit, leaseguard, factfence, jsonfold

Have a say

Vote for this tool, suggest a feature, or discuss it with other operators on the community board.