Documentation
¶
Overview ¶
Command flakescan counts a named test's failures across a repository's CI history, by lane, with a denominator.
⛔ IT EXISTS BECAUSE THE SWEEP WAS DONE BY HAND THREE TIMES AND GAVE THREE ANSWERS. go-crdt/collab#204 is one flake, sampled on 2026-10-03 over "commits on main", on 2026-11-15 over "RED runs on main", and once over "the pull request I happened to be on". Each answered a different question, and the corrections recorded in that issue are the evidence: the commit count came out 7, then 8, then 6, then 9, and `conclusion` is EMPTY for a run that has not finished, so a filter of `!= "success"` counts queued runs as failures.
⛔ AND THE POPULATION IS THE WHOLE DIFFICULTY, not the counting. Measured on 2026-11-19, run 39069166645 of go-crdt/collab:
attempt 2, conclusion success, event pull_request attempts/1/jobs -> one job not success: "test (ubuntu-latest)" failure
That occurrence is invisible twice over -- it is not on the default branch, and the run it lives in is GREEN today, because somebody re-ran the job. A flake is precisely the failure that gets re-run, so "N failures in M runs" is a floor on the rate rather than the rate, and a census that reads only runs whose conclusion is `failure` cannot see the thing it is counting.
So this reads RUNS x ATTEMPTS, prints the lane, and refuses to read a log it could not fetch as an absence.