# flakestat: complete documentation Source: https://flakestat.com/ · Generated 2026-09-08 · MIT licensed flakestat finds flaky tests in any language from JUnit XML. It runs locally as a single static binary with no account and no data egress. ============================================================================== ## Install flakestat URL: https://flakestat.com/docs/#install install Homebrew npm pip Go Script Docker Copy brew install rowhitswami/tap/flakestat npm install --save-dev flakestat # or, without installing: npx flakestat report pip install flakestat go install github.com/rowhitswami/flakestat/cmd/flakestat@latest curl -sSfL https://raw.githubusercontent.com/rowhitswami/flakestat/main/scripts/install.sh \ | sh -s -- -b /usr/local/bin docker run --rm -v "$PWD:/workspace" ghcr.io/rowhitswami/flakestat report Or download a binary directly from Releases . macOS, Linux and Windows, on x86_64 and arm64. The binary is statically linked and has no runtime dependencies. Verify the install Copy flakestat version flakestat --help Which install should I use? Route Best when brew You work on macOS or Linux and want it on your PATH globally. npm The project is JS or TS. Pins the version in package.json so CI and laptops match. pip The project is Python. Same benefit: the version is pinned with your other dev tooling. go install You have Go and want to build from source. Script CI images without a package manager. Pin with -b and a version tag. Docker You'd rather not install anything. Mount the repo at /workspace . Pin the version in CI A floating latest means a scoring change can move your verdicts between builds. The GitHub Action takes a version input, and the install script takes a tag. Next Head to the quickstart . Two commands, and you'll know whether your suite is flaky. ------------------------------------------------------------------------------ ## Quickstart URL: https://flakestat.com/docs/#quickstart 1. Hunt: is this suite flaky right now? Runs your test command N times on unchanged code and reports what disagreed. Use it when you already suspect a suite, or before opening a pull request. hunt for flaky tests pytest Jest go test Maven Copy flakestat hunt --runs 20 --junit 'reports/junit-{run}.xml' \ -- pytest --junitxml='{junit}' flakestat hunt --runs 20 --junit 'reports/junit-{run}.xml' \ -- npx jest --reporters=jest-junit flakestat hunt --runs 20 --junit 'reports/junit-{run}.xml' \ -- gotestsum --junitfile='{junit}' -- ./... flakestat hunt --runs 20 --junit 'target/surefire-reports/*.xml' \ -- mvn -q test {run} becomes the run number so each run writes its own report, and {junit} becomes that path inside your command. Everything after -- is your command, passed through untouched. Let it detect your setup Copy flakestat init # writes .flakestat.json flakestat hunt # no flags needed init looks at your project and writes the command and report path once, so the day-to-day invocation is a single word. See configuration . 2. Ingest: which tests are flaky over time? Records the CI runs you already pay for. This is the one that catches flakes that only appear on one platform, one runtime, or under CI load, and it costs no extra compute. Copy # in CI, after your tests run flakestat ingest 'reports/**/*.xml' # any time flakestat report --top 20 See tracking flakiness over time for where to keep the history, and GitHub Actions for a complete workflow. Which should I use? Hunt when you need an answer in the next ten minutes. Ingest when you want a reliable picture of the whole suite. They write to the same history, so using both just gives you more evidence. What you get back flakestat report Copy VERDICT SCORE CONF RUNS PASS/FAIL TEST flaky 0.62 high 20 14/6 test_demo::test_flaky_race suspect 0.08 low 6 5/1 test_api::test_timeout consistently-failing 0.00 high 20 0/20 test_demo::test_broken Read the columns in reading a report , or ask about one test with flakestat explain . If it finds nothing That is a real result, not a failure. It means nothing disagreed in that many runs. A test that fails 2% of the time will usually survive 20 runs untouched. Raise --runs , or record CI history where the sample grows for free. ------------------------------------------------------------------------------ ## Reading a report URL: https://flakestat.com/docs/#reading-a-report Copy VERDICT SCORE CONF RUNS PASS/FAIL TEST flaky 0.62 high 20 14/6 test_demo::test_flaky_race suspect 0.08 low 6 5/1 test_api::test_timeout consistently-failing 0.00 high 20 0/20 test_demo::test_broken Verdicts flaky Disagrees with itself often enough, with enough evidence, to act on. suspect Some disagreement, below the flaky threshold. Worth watching, not worth a ticket yet. stable No meaningful disagreement. consistently-failing Fails every time. Broken, not flaky, and a different problem with a different fix. insufficient-data Fewer runs than needed for a verdict. More runs would help. always-skipped Never actually ran. More runs would not help, so this is deliberately not the same as insufficient data. Score is not a failure rate Score is how often a test disagrees with itself: 0.62 means roughly six of ten consecutive runs changed their answer. A test that fails every single time scores 0.00 , because its outcome never disagrees with itself. It is broken, and it shows up as consistently-failing so you can fix it as the different problem it is. Why this matters A failure-rate ranking puts your most broken test at the top of the flaky list, where it wastes the time of whoever is hunting nondeterminism. Ranking by inconsistency puts the genuinely nondeterministic tests there instead. Confidence Confidence is low , medium or high depending on how much evidence sits behind the score. A score of 0.62 from three runs and the same score from three hundred are very different claims, and a small sample can never reach high no matter how flaky the test looks. Classification uses a lower bound on the score rather than the score itself, so a verdict requires evidence rather than a lucky flip in a short run. The mechanics are in how scoring works . Column Meaning SCORE Weighted rate at which consecutive runs disagreed. CONF How much evidence supports that score. RUNS Scored observations. Skips are excluded, because a skip is not evidence either way. PASS/FAIL Counts among scored runs. TEST Stable identity, from suite, class and name. Other output formats Copy flakestat report --format json # for tooling flakestat report --format markdown # for a PR comment or wiki flakestat report --all # include stable and unscored tests flakestat report --top 20 # worst 20 only ------------------------------------------------------------------------------ ## Hunting flaky tests locally URL: https://flakestat.com/docs/#hunting hunt for flaky tests pytest Jest go test Maven Copy flakestat hunt --runs 20 --junit 'reports/junit-{run}.xml' \ -- pytest --junitxml='{junit}' flakestat hunt --runs 20 --junit 'reports/junit-{run}.xml' \ -- npx jest --reporters=jest-junit flakestat hunt --runs 20 --junit 'reports/junit-{run}.xml' \ -- gotestsum --junitfile='{junit}' -- ./... flakestat hunt --runs 20 --junit 'target/surefire-reports/*.xml' \ -- mvn -q test How many runs do I need? It depends entirely on how rare the flake is. These are measured against synthetic tests with known failure probabilities: Flake rate Runs for reliable detection 25% or higher 20 runs is plenty 10% 50 or more 5% 100+, and a local burst is starting to be the wrong instrument Below 5% Record CI history instead Chasing one test Copy flakestat hunt --runs 50 --junit 'reports/junit-{run}.xml' \ -- pytest tests/test_checkout.py::test_race --junitxml='{junit}' Narrowing to one test is usually much faster per run, so you can afford far more runs, which is exactly what a rare flake needs. If it finds nothing That is a real result. It means nothing disagreed in that many runs, which is evidence the test is not flaky at a rate this sample could detect . It is not evidence the test is clean. Raise --runs , or let CI history accumulate. A warning about --parallel --parallel N runs N copies of your command in the same working directory . A suite that writes fixed paths, binds a fixed port or shares a database will collide with itself and look flaky when it isn't. This is real, not theoretical. Running against spf13/cobra with --parallel 4 reported TestDeadcodeElimination as flaky at 0.60. It isn't. the test builds a binary at a fixed path, and concurrent copies deleted each other's build. Sequentially, cobra is completely clean. So flakestat verifies its own findings. Candidates found under --parallel are re-run sequentially and demoted from flaky to suspect if they don't reproduce. Sequential (the default) is always trustworthy. Use --parallel to hunt faster and let verification sort out the difference, or --verify 0 to opt out. Scoring the whole history instead By default hunt scores only the burst it just ran. Add --history to score everything recorded so far, burst and CI runs together. Copy flakestat hunt --runs 20 --history ------------------------------------------------------------------------------ ## Tracking flakiness over time URL: https://flakestat.com/docs/#history Copy flakestat ingest 'reports/**/*.xml' \ --commit "$GIT_SHA" --branch "$BRANCH" Commit and branch default to the current git checkout, so in most CI setups you can omit them. Recording the commit is what lets flakestat tell genuine flakiness, same code and different result, from a regression someone later fixed. History lives in .flakestat/runs.ndjson , one JSON object per line. Because it is append-only NDJSON, results from parallel CI shards concatenate with cat and no merge step. Re-ingesting is safe Every observation carries the identity of the execution it describes, so an artifact uploaded twice, a re-run aggregation step, or a shard collected by two jobs is counted once, while a genuine retry, which really did run the tests again, still counts. Duplicates are not harmless A duplicate carries its original's timestamp, sorts next to it, and always agrees with itself, so uncounted duplicates make a flaky test look stable . Measured on a test failing 4 of 12 runs, ingesting the same reports twice moved the score from 0.64 to 0.30. The error runs towards false negatives, which is the direction that loses tests quietly. Copies are ignored on read, so nothing is required of you. flakestat compact removes them from the file as well, which is worth doing when the file is the record you keep. Where to keep the history Commit it Simplest. The file goes in the repo and everyone shares one history. Downside: every CI run wants to write to it, so telemetry lands in your development history. A CI artifact Zero setup, but nothing accumulates. Each run sees only itself, so you never build the long history that makes the tool accurate. Recommended A dedicated branch What flakestat uses for itself. Keeps telemetry out of development history, avoids a bot commit retriggering your workflow, and gives one place to serialize writers. the arrangement Copy matrix jobs → per-job NDJSON artifacts → aggregate job → fetch history branch → merge + compact → analyze → commit back to the history branch .github/workflows/ci.yml Copy concurrency: group: flakestat-history-writer cancel-in-progress: false Not a CI cache Cache eviction should cost you time, not statistical history. Keep the record in durable storage and let the cache stay an optimization. flakestat's own CI workflow implements this end to end, including re-merging a push that lost a race against another run. Trimming the file Copy flakestat compact # drop duplicate executions flakestat compact --dry-run # report what would go, change nothing compact refuses to rewrite a log containing unreadable lines, since reading skips those and rewriting would delete evidence you might still recover. ------------------------------------------------------------------------------ ## Recording where tests ran URL: https://flakestat.com/docs/#dimensions Copy flakestat ingest 'reports/**/*.xml' \ --dimension os=windows \ --dimension runtime.version=3.13 \ --dimension database=postgres-17 flakestat explain Copy Where the failures concentrate os=windows failures here: 12 / 12 (100.0%) elsewhere: 0 / 24 (0.0%) difference: +100.0 pp Two rules that keep it honest Nothing is scraped. Only a whitelist of known CI variables is read, and only JUnit names flakestat recognizes. The process environment is never walked, so secrets, tokens and build ids cannot end up in your history. Host details are recorded only when flakestat ran the tests. If one job downloads other jobs' artifacts and ingests them centrally, pass --no-host : otherwise the aggregator's platform is stamped onto results from everywhere else, and analysis can conclude the exact opposite of the truth. Canonical keys Key Meaning os , arch Platform the tests ran on runtime.name , runtime.version Language runtime under test ci.provider github, gitlab, circleci, buildkite, jenkins, azure ci.run_id , ci.job_id Provenance. Recorded, never analysed, since every failure happened during some run ci.attempt Separates a retry from a duplicate. Never analysed: retries happen because of failures ci.shard , ci.worker Which shard or worker executed the run Anything else you pass is a user dimension and is analysed normally: database version, browser, feature flag, region. Correlation, never causation flakestat says failures cluster on Windows. It will not claim Windows is why. Observational data cannot distinguish a cause from anything perfectly correlated with it, and when several dimensions vary together, as os and arch usually do on a CI matrix, it reports all of them and says the observations cannot tell which one matters. Three guards stop it producing confident nonsense over sparse data: an evidence floor, an effect-size floor, and a Benjamini–Hochberg correction for how many dimensions were tested. Testing os, arch, runtime, browser and database will eventually turn up something that looks significant purely by chance. ------------------------------------------------------------------------------ ## Gating CI without a permanently red build URL: https://flakestat.com/docs/#ci-gate Most repos already have flaky tests when they adopt a tool like this. Failing on all of them means a red build on day one, and a deleted gate by day three. So check is a ratchet rather than a threshold. Copy flakestat check --update-baseline # once; commit .flakestat/baseline.json flakestat check --fail-on-new # in CI from then on Exit code Meaning 0 Nothing new 1 A test became flaky that wasn't in the baseline 2 An accepted test got measurably worse ( --fail-on-regression ) Keeping jitter out of your builds Scores move a little as evidence accumulates. --regression-delta (default 0.1 ) is how much an accepted test has to worsen before it counts as a regression, so ordinary drift doesn't fail builds. Tightening the ratchet Tests that stop being flaky are reported as FIXED . That is your cue to re-run --update-baseline so the newly clean test can never silently regress. flakestat check Copy FIXED test_api::test_timeout was 0.31, now 0.00 NEW test_cart::test_checkout 0.42 (high) 1 newly flaky test. Baseline has 4 accepted. Order matters in CI Ingest before you gate, and let the test step continue on error. A failed suite is exactly the run you most want recorded. See GitHub Actions for the full sequence. ------------------------------------------------------------------------------ ## Unblocking the pipeline URL: https://flakestat.com/docs/#quarantine quarantine pytest Jest go test YAML Copy flakestat quarantine --format pytest -o quarantine.txt pytest @quarantine.txt flakestat quarantine --format jest -o quarantine.json flakestat quarantine --format go flakestat quarantine --format yaml -o quarantine.yaml Flag Effect --format pytest , go , jest , yaml (default) or json --include-broken Also list consistently failing tests -o Write to a file instead of stdout --quiet Suppress the summary line on stderr A tourniquet, not a cure Everything in the file is something to fix. Quarantine buys you a working pipeline while you work the list down; it does not make the tests correct. Keep the file in review so it cannot grow quietly. A workable rhythm Quarantine what is blocking merges today. Commit a baseline so nothing new gets in. Fix the worst-ranked test, remove it from quarantine, update the baseline. Repeat. The list only shrinks, because the gate stops it growing. ------------------------------------------------------------------------------ ## Explaining a verdict URL: https://flakestat.com/docs/#explain Copy flakestat explain test_checkout_flow Copy tests/test_checkout.py::test_checkout_flow id 4c1f9a2e77b3d810 Classification: flaky Score: 0.55 Confidence: high (lower bound 0.402 over 41 transition(s)) Observations: 42 Passed: 27 Failed: 15 Failure rate: 35.7% Transitions: 41 Same-commit disagreements: 9 Seen across: 6 commit(s), 2 branch(es) History (last 20 of 42, oldest first) P F P P F P F F P P P F P P F P P F P P ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ P pass F fail - skip ^ flip ! flip on identical code Reading the strip Symbol Meaning P / F Passed / failed - Skipped. Carries no signal, so it is shown but never counted as an outcome ^ The outcome changed from the previous comparable run ! It changed on identical code , the strongest single piece of evidence a test is flaky Markers appear only between observations that are actually comparable: same branch, same platform, same runtime. A test that always passes on Linux and always fails on Windows is deterministic, so its strip carries no flip markers even though the outcomes differ. Options Copy flakestat explain test_name --json # the same evidence, for tooling flakestat explain test_name --history 80 # widen the strip flakestat explain 4c1f9a2e77b3d810 # by id, when names are ambiguous If a name matches several tests, flakestat lists the candidates with their ids rather than guessing which you meant. ------------------------------------------------------------------------------ ## GitHub Actions URL: https://flakestat.com/docs/#github-actions .github/workflows/ci.yml Copy - name: Run tests run: pytest --junitxml=reports/junit.xml continue-on-error: true - uses: rowhitswami/flakestat@v0.2.1 with: args: ingest 'reports/**/*.xml' comment: true # post/update a PR comment annotations: true # annotate new flakes in the diff That records the run, writes a report to the job summary, and posts it as a pull request comment. A re-run updates the same comment rather than adding another. The intended sequence Copy - run: pytest --junitxml=reports/junit.xml continue-on-error: true # record the run even when it fails - uses: rowhitswami/flakestat@v0.2.1 with: { args: "ingest 'reports/**/*.xml'" } - uses: rowhitswami/flakestat@v0.2.1 with: { args: "check --fail-on-new", comment: true } continue-on-error matters A failed suite is exactly the run you most want in the history. Without it, the job stops before ingest and you record only the runs that passed, which is the one sample guaranteed to hide flakiness. Inputs Input Default Description args None Arguments passed to flakestat version latest Release tag to install, e.g. v0.2.1 install-only false Put the binary on PATH without running it summary true Append the report to the job summary comment false Post/update a PR comment (needs pull-requests: write ) annotations false Annotate new and regressed tests in the diff max-rows 20 Cap the highlight table on large suites working-directory . Directory to run in Outputs: flaky-count , new-flaky-count , report-file . Permissions Copy permissions: contents: read pull-requests: write # only if comment: true Matrix builds Let each matrix job ingest its own results, then merge the NDJSON in an aggregate job. That way every observation records the platform it actually ran on, rather than the aggregator's. Copy - uses: rowhitswami/flakestat@v0.2.1 with: args: >- ingest 'reports/**/*.xml' --dimension os=${{ matrix.os }} - uses: actions/upload-artifact@v4 with: name: observations-${{ matrix.os }} path: .flakestat/runs.ndjson See recording where tests ran for why this matters, and tracking over time for where to keep the merged history. ------------------------------------------------------------------------------ ## GitLab, CircleCI and others URL: https://flakestat.com/docs/#gitlab Provider context (run id, job id, attempt and shard) is detected automatically for GitLab CI, CircleCI, Buildkite, Jenkins and Azure Pipelines. GitLab CI CircleCI Jenkins Buildkite Copy test: script: - pytest --junitxml=reports/junit.xml || true - curl -sSfL https://raw.githubusercontent.com/rowhitswami/flakestat/main/scripts/install.sh | sh -s -- -b /usr/local/bin - flakestat ingest 'reports/**/*.xml' - flakestat check --fail-on-new artifacts: paths: [.flakestat/runs.ndjson] when: always - run: name: Tests command: pytest --junitxml=reports/junit.xml when: always - run: name: Record flakiness command: | curl -sSfL https://raw.githubusercontent.com/rowhitswami/flakestat/main/scripts/install.sh \ | sh -s -- -b /usr/local/bin flakestat ingest 'reports/**/*.xml' flakestat check --fail-on-new when: always stage('Test') { steps { sh 'pytest --junitxml=reports/junit.xml || true' sh 'flakestat ingest "reports/**/*.xml"' sh 'flakestat check --fail-on-new' } } steps: - command: - "pytest --junitxml=reports/junit.xml || true" - "flakestat ingest 'reports/**/*.xml'" - "flakestat check --fail-on-new" artifact_paths: ".flakestat/runs.ndjson" Always record, even on failure Every example above lets the test step fail without stopping the job. Recording only successful runs is the one sample guaranteed to hide flakiness. Sharded pipelines Let each shard ingest its own results and concatenate the NDJSON afterwards. Each shard then records the context it actually ran in, rather than the aggregator's. Copy # in each shard flakestat ingest 'reports/**/*.xml' --dimension ci.shard="$CI_NODE_INDEX" # in the aggregate job cat shard-*/runs.ndjson > .flakestat/runs.ndjson flakestat compact flakestat report --top 20 No CI at all flakestat is just a binary reading local files. Point it at any directory of JUnit XML you have, from any source. Copy flakestat ingest 'archive/2026-*/junit.xml' flakestat report ------------------------------------------------------------------------------ ## Command reference URL: https://flakestat.com/docs/#commands Command What it does init Detect the project and write .flakestat.json hunt Run a test command N times and detect disagreement ingest Load JUnit XML from CI into the history report Score recorded history and print a report explain Show why one test received its verdict check Fail CI when flakiness gets worse, not when it exists quarantine Emit a skip list your test runner accepts ci-report Render a report for job summaries and PR comments compact Drop observations duplicating an already-recorded execution Scoring flags Accepted by hunt , report , explain , check and quarantine . Defaults are calibrated against a ground-truth corpus, not chosen by intuition. See how scoring works before changing them. Flag Default Effect --threshold 0.10 Score at or above which a test is called flaky --suspect-threshold 0.05 Score at or above which a test is called suspect --min-runs 5 Scored runs required before any verdict --same-commit-weight 3 How much more a same-commit disagreement counts --branch-weight 0.5 Weight for disagreement off the default branch --default-branch main Branch whose results are trusted fully --alpha 0.3 Recency decay; higher weights recent runs more Output flags Flag Default Effect --format table table , json or markdown --all false Include stable and unscored tests --top N 0 Show only the worst N tests (0 = all) --no-color false Disable colour, for logs and pipes --dir .flakestat State directory Command-specific flags hunt Flag Effect --runs N How many times to run the command --junit PATH Where each run writes its report; supports {run} --parallel N Run N copies concurrently. Read the warning in hunting --history Score all recorded history, not just this burst --dimension k=v Attach context; repeatable ingest Flag Effect --commit SHA Commit these results belong to (default: current git HEAD) --branch NAME Branch name (default: current git branch) --dimension k=v Attach context; repeatable --no-host Never record this machine's platform, even in CI --run-id ID Identifier for this run (default: generated) check Flag Effect --update-baseline Accept current flakiness as the baseline --fail-on-new Exit 1 when a test is newly flaky (default true) --fail-on-regression Exit 2 when an accepted test worsens --regression-delta Score increase before that counts (default 0.1) --baseline PATH Baseline file (default /baseline.json ) ------------------------------------------------------------------------------ ## Configuration URL: https://flakestat.com/docs/#config Copy flakestat init # detects your project flakestat init --project pytest # or skip detection flakestat init --force # overwrite an existing config .flakestat.json Copy {{ "command": ["pytest", "--junitxml={junit}"], "junit": "reports/junit-{run}.xml", "runs": 20, "threshold": 0.10 }} With that file in place, the whole invocation becomes: Copy flakestat hunt Precedence Flags always win over the file, so a one-off flakestat hunt --runs 50 works without editing anything. Nothing in the file is required, and every key has a default. Key Meaning command Your test command as an argv array. {junit} is substituted. junit Where each run writes its report. {run} is substituted. runs Default run count for hunt threshold Flaky threshold suspect_threshold Suspect threshold min_runs Scored runs before a verdict default_branch Branch whose results are trusted fully Commit it The config belongs in the repo. It is how everyone on the team, and CI, runs the same thing. What gets written where Path What it is Commit it? .flakestat.json Configuration Yes .flakestat/runs.ndjson Observation history Depends .flakestat/baseline.json Accepted flakiness for check Yes ------------------------------------------------------------------------------ ## How scoring works URL: https://flakestat.com/docs/#scoring Try it Click any run to cycle it between pass, fail and skip. The verdict below is computed with the same rules the binary uses. Outcome history, oldest first, in one execution context on one commit. + run − run Flaky Stable Always fails Too few runs Always skipped Verdict · Score · Lower bound · Pass / fail · Comparisons · The demo covers one execution context on one commit, which is where the interesting behaviour is. The binary additionally weights same-commit and cross-branch evidence, and decays by age, in steps 3 and 4 below. The five steps Group by execution context. Two outcomes are only comparable if branch, os, arch and runtime were the same. Without this, interleaving platforms makes a test that always fails on Windows and always passes elsewhere read as constant disagreement, a phantom signal that has caught this project twice. Count transitions. Every adjacent pair within a context that disagreed is a flip. Failure rate is deliberately not used, which is why an always-failing test scores zero. Weight them. A flip on the same commit counts three times a cross-commit one, because the latter may be a regression someone fixed. Disagreement off the default branch counts for half, because failures there are expected. Decay by age. Age is measured in commits , not observations, so a 200-run burst on one commit uses all of its evidence instead of only the tail. Take a lower bound. Classification uses a Wilson score lower bound with an effective sample size, so a verdict requires evidence rather than a lucky flip in a short run. Skips are not outcomes Copy pass -> pass evidence failure -> fail evidence error -> fail evidence skip -> neither A skipped run is not evidence either way, so it never becomes an outcome a neighbour can disagree with, and never enters the failure rate. P S P is one comparison between two passes, not two disagreements. Where failures concentrate Association analysis is separate and never touches the score. A test is flaky because its outcomes demonstrate flakiness; associations only say where that flakiness concentrates. Findings must clear an evidence floor, an effect-size floor, and a Benjamini–Hochberg correction for how many dimensions were tested. See recording where tests ran . Going deeper The design notes record the reasoning in full, including the mistakes that shaped it: a recency weight that made 100 runs no better than 10, a parallel mode that manufactured the flakiness it reported, and three separate occasions where incomparable observations were compared. The validation record covers whether any of it holds up against somebody else’s bugs. ------------------------------------------------------------------------------ ## Supported test runners URL: https://flakestat.com/docs/#runners pytest Jest Vitest go test JUnit 5 TestNG Surefire RSpec PHPUnit Mocha Playwright Cypress xUnit NUnit cargo test Language Runner How to emit JUnit XML Python pytest pytest --junitxml=reports/junit.xml Python unittest unittest-xml-reporting JS / TS Jest jest-junit reporter JS / TS Vitest --reporter=junit JS / TS Mocha mocha-junit-reporter JS / TS Playwright --reporter=junit JS / TS Cypress cypress-multi-reporters Go go test gotestsum --junitfile reports/junit.xml Java Maven Surefire Written by default to target/surefire-reports/ Java Gradle / JUnit 5 Written by default to build/test-results/ Ruby RSpec rspec_junit_formatter PHP PHPUnit --log-junit reports/junit.xml .NET xUnit / NUnit dotnet test --logger junit Rust cargo test cargo2junit or cargo-nextest Elixir ExUnit junit_formatter Dialect tolerance JUnit XML has no official schema, so every framework writes it slightly differently. The parser handles both root elements, nested suites, locale-formatted durations like 4,521 , bytes that are illegal in XML 1.0, and Surefire's markers, which are a direct flakiness signal and are read as one. Playwright emits for some failures and for others; both count as failures. A test counts as neither. No JUnit XML? flakestat falls back to exit codes and reports suite-level flakiness. That is less precise, because you learn the suite is flaky rather than which test, but it works with anything that returns a status code. Copy flakestat hunt --runs 20 -- ./run-tests.sh ------------------------------------------------------------------------------ ## Frequently asked questions URL: https://flakestat.com/docs/#faq Does my test data leave my machine? No. flakestat is a binary that reads local files and writes a local file. There is no network call, no account and no telemetry. My test failed 100% of the time. Why is the score zero? Because it isn't flaky, it's broken. flakestat scores how often a test disagrees with itself , not how often it fails, so a consistently failing test scores zero and appears as consistently-failing , a different problem with a different fix. See reading a report . How many runs do I need? Depends on the flake rate. ~25% is reliably caught within 20 runs; 10% usually needs 50 or more; below about 5% a local burst is the wrong instrument and CI history is right. insufficient-data means exactly that. There is not enough evidence yet. Can I use it with a monorepo or sharded CI? Yes. Let each shard ingest its own results and concatenate the NDJSON. It is append-only and one observation per line specifically so that works with cat and no merge step. Does re-running a job double-count? No. Each observation carries the identity of the execution it describes, so the same artifact ingested twice counts once, while a genuine retry, which really did run the tests again, counts as the second execution it is. Will it slow down my CI? ingest parses XML files you already produce; it is milliseconds. hunt runs your suite N times and costs exactly that, which is why it is a local tool rather than something on every build. What if my runner doesn't write JUnit XML? Almost all of them can, with one flag or one reporter package. See supported runners . Failing that, exit-code mode still gives suite-level results. Is it free? Yes. MIT licensed, free at any volume, and no per-seat or per-run pricing, because it runs on your own machines, so there is nothing to meter. How is this different from just retrying failed tests? Retries hide flakiness; flakestat measures it. A retried test still costs time and still fails in ways that matter. Retry to keep the pipeline moving, and measure so the list actually shrinks. Gating on regressions is how you stop it growing. Why not just use a hosted service? Use one if you want dashboards, org-wide rollups and alerting. They do that well. flakestat is for the case where you want detection to be local, free and yours. See how it compares . ------------------------------------------------------------------------------ ## Find flaky tests in pytest URL: https://flakestat.com/flaky-tests/pytest/ 1. Emit JUnit XML pytest Copy pytest --junitxml=reports/junit.xml pytest writes JUnit XML natively, so there is no plugin to install. If you already use pytest-rerunfailures , keep it. Retries keep the pipeline moving, but they hide the flakiness rather than measuring it. flakestat measures it so the list actually shrinks. 2. Hunt for disagreement run the suite 20 times Copy flakestat hunt --runs 20 --junit 'reports/junit-{run}.xml' \ -- pytest --junitxml='{junit}' That runs your suite 20 times on unchanged code and reports which tests changed their answer. Nothing is modified in your repo, and the whole thing is one binary. 3. Read the result Copy VERDICT SCORE CONF RUNS PASS/FAIL TEST flaky 0.62 high 20 14/6 test_checkout::test_race consistently-failing 0.00 high 20 0/20 test_api::test_broken A test failing every time scores 0.00 and is reported separately, because it is broken, not flaky, and mixing the two wastes the time of whoever is hunting nondeterminism. Full explanation of the columns . 4. Record CI runs so it keeps working A local burst finds the obvious flakes. Recording the CI runs you already pay for finds the ones that only appear on another platform, another runtime, or under load, at no extra compute. Copy flakestat ingest 'reports/**/*.xml' flakestat report --top 20 See GitHub Actions or GitLab and others for a complete workflow, and gating CI to stop new flaky tests getting in. Why not just retry? Retrying keeps the pipeline moving, and you should. But it hides the problem. A test that needs a retry still fails sometimes in ways that matter, and a suite with retries on stays flaky for years because nothing ever measures whether it is getting better. Retry to unblock; measure so the list shrinks. Install install Homebrew npm pip Go Script Docker Copy brew install rowhitswami/tap/flakestat npm install --save-dev flakestat # or, without installing: npx flakestat report pip install flakestat go install github.com/rowhitswami/flakestat/cmd/flakestat@latest curl -sSfL https://raw.githubusercontent.com/rowhitswami/flakestat/main/scripts/install.sh \ | sh -s -- -b /usr/local/bin docker run --rm -v "$PWD:/workspace" ghcr.io/rowhitswami/flakestat report Then the quickstart takes about two minutes. ------------------------------------------------------------------------------ ## Find flaky tests in Jest URL: https://flakestat.com/flaky-tests/jest/ 1. Emit JUnit XML Jest Copy npx jest --reporters=default --reporters=jest-junit Install jest-junit and point it at a per-run path. Jest's --retryTimes hides flakiness rather than measuring it. Useful to keep CI moving, but it is why flaky suites stay flaky for years. Vitest works the same way with --reporter=junit . 2. Hunt for disagreement run the suite 20 times Copy flakestat hunt --runs 20 --junit 'reports/junit-{run}.xml' \ -- npx jest --reporters=jest-junit That runs your suite 20 times on unchanged code and reports which tests changed their answer. Nothing is modified in your repo, and the whole thing is one binary. 3. Read the result Copy VERDICT SCORE CONF RUNS PASS/FAIL TEST flaky 0.62 high 20 14/6 test_checkout::test_race consistently-failing 0.00 high 20 0/20 test_api::test_broken A test failing every time scores 0.00 and is reported separately, because it is broken, not flaky, and mixing the two wastes the time of whoever is hunting nondeterminism. Full explanation of the columns . 4. Record CI runs so it keeps working A local burst finds the obvious flakes. Recording the CI runs you already pay for finds the ones that only appear on another platform, another runtime, or under load, at no extra compute. Copy flakestat ingest 'reports/**/*.xml' flakestat report --top 20 See GitHub Actions or GitLab and others for a complete workflow, and gating CI to stop new flaky tests getting in. Why not just retry? Retrying keeps the pipeline moving, and you should. But it hides the problem. A test that needs a retry still fails sometimes in ways that matter, and a suite with retries on stays flaky for years because nothing ever measures whether it is getting better. Retry to unblock; measure so the list shrinks. Install install Homebrew npm pip Go Script Docker Copy brew install rowhitswami/tap/flakestat npm install --save-dev flakestat # or, without installing: npx flakestat report pip install flakestat go install github.com/rowhitswami/flakestat/cmd/flakestat@latest curl -sSfL https://raw.githubusercontent.com/rowhitswami/flakestat/main/scripts/install.sh \ | sh -s -- -b /usr/local/bin docker run --rm -v "$PWD:/workspace" ghcr.io/rowhitswami/flakestat report Then the quickstart takes about two minutes. ------------------------------------------------------------------------------ ## Find flaky tests in go test URL: https://flakestat.com/flaky-tests/go/ 1. Emit JUnit XML go test Copy gotestsum --junitfile reports/junit.xml -- ./... go test does not write JUnit XML itself, so use gotestsum , which does and is a drop-in wrapper. Two flags matter: -count=1 defeats the test cache so every run really runs, and -shuffle=on varies test order, which is what surfaces order-dependent flakes caused by shared package-level state. 2. Hunt for disagreement run the suite 20 times Copy flakestat hunt --runs 20 --junit 'reports/junit-{run}.xml' \ -- gotestsum --junitfile='{junit}' -- ./... -count=1 That runs your suite 20 times on unchanged code and reports which tests changed their answer. Nothing is modified in your repo, and the whole thing is one binary. 3. Read the result Copy VERDICT SCORE CONF RUNS PASS/FAIL TEST flaky 0.62 high 20 14/6 test_checkout::test_race consistently-failing 0.00 high 20 0/20 test_api::test_broken A test failing every time scores 0.00 and is reported separately, because it is broken, not flaky, and mixing the two wastes the time of whoever is hunting nondeterminism. Full explanation of the columns . 4. Record CI runs so it keeps working A local burst finds the obvious flakes. Recording the CI runs you already pay for finds the ones that only appear on another platform, another runtime, or under load, at no extra compute. Copy flakestat ingest 'reports/**/*.xml' flakestat report --top 20 See GitHub Actions or GitLab and others for a complete workflow, and gating CI to stop new flaky tests getting in. Why not just retry? Retrying keeps the pipeline moving, and you should. But it hides the problem. A test that needs a retry still fails sometimes in ways that matter, and a suite with retries on stays flaky for years because nothing ever measures whether it is getting better. Retry to unblock; measure so the list shrinks. Install install Homebrew npm pip Go Script Docker Copy brew install rowhitswami/tap/flakestat npm install --save-dev flakestat # or, without installing: npx flakestat report pip install flakestat go install github.com/rowhitswami/flakestat/cmd/flakestat@latest curl -sSfL https://raw.githubusercontent.com/rowhitswami/flakestat/main/scripts/install.sh \ | sh -s -- -b /usr/local/bin docker run --rm -v "$PWD:/workspace" ghcr.io/rowhitswami/flakestat report Then the quickstart takes about two minutes. ------------------------------------------------------------------------------ ## flakestat vs Trunk Flaky Tests URL: https://flakestat.com/compare/trunk/ Trunk is a hosted service with dashboards, org-wide rollups and alerting. It does same-commit detection too, and does the hosted part well. flakestat is a single binary that does the detection part locally, for free, with your test data never leaving your machines. Both read the JUnit XML your runner already writes. The difference is where the analysis happens, what it is allowed to claim, and whether you can check that it works. What flakestat does differently It ranks by inconsistency, not failure rate. A test that fails every single time is not flaky, it is broken, and the two need completely different fixes. flakestat scores how often a test disagrees with itself between runs, so an always-failing test scores 0.00 and is reported separately as consistently-failing instead of topping the list and costing somebody an afternoon. Every verdict carries a confidence level. A score of 0.62 from three runs and 0.62 from three hundred are different claims. Classification uses a lower bound on the score rather than the score itself, so a small sample can never reach a confident verdict no matter how dramatic the failures look. You can verify the detection works. Two commands reproduce a before and after against somebody else’s bug: ConduitIO’s repository at the commit before their own deflaking fix, and at the fix. Three tests come back flaky on one side and stable on the other. No hosted service lets you audit its scoring this way, because the scoring is the product. Copy git clone https://github.com/rowhitswami/flakestat && cd flakestat ./scripts/reproduce-validation.sh It refuses to claim causation. When failures cluster on Windows it says they cluster on Windows. When os and arch vary together, as they do on most CI matrices, it says the observations cannot tell which one matters rather than picking one. More on that . The history is a file you own. Append-only NDJSON in your repository or your artifact store. You can read it, diff it, merge shards with cat , and take it with you. There is no export step because there is nothing to export from. Side by side flakestat Trunk Flaky Tests Cost Free at any volume, MIT licensed Per seat or per run Where analysis runs Your machine or your CI runner Their service Test data leaves your machine No Yes, results are uploaded Works before you push Yes, hunt reruns locally No, it needs CI results Scoring you can audit Yes, readable source plus a reproduction script Proprietary Broken separated from flaky Yes, consistently-failing scores 0.00 Varies Confidence on each verdict Yes, and thin evidence is refused Varies History format NDJSON you own Their database Setup One binary, no account Account plus CI integration Languages Any that writes JUnit XML Many Dashboards and history UI No, terminal and CI job summary Yes Org-wide rollups, alerting, ownership No Yes Auto-quarantine in the platform Emits a skip list you apply Yes, managed When flakestat is the better choice Test data cannot leave your infrastructure, whether from regulation, private code, or policy. You want to catch a flake before pushing, not after CI reports it. The budget for this is zero, or the volume makes per-run pricing awkward. You want to read the scoring and check it yourself rather than trust a number. You want one tool across a polyglot monorepo, because the input is JUnit XML rather than a language integration. When Trunk Flaky Tests is the better choice Worth saying plainly, because a comparison that finds no case for the alternative is an advertisement. You want a dashboard non-engineers can read. You need rollups across many repositories and teams. You want alerting, ownership routing and SLA tracking. You would rather buy the whole workflow than assemble it. flakestat does not try to do any of that. Can I use both? Yes, and it is a reasonable setup: the hosted service for org-wide visibility, flakestat locally so an engineer can reproduce and confirm a flake in ten minutes without pushing. They read the same JUnit XML and neither interferes with the other. Try it in two minutes brew install rowhitswami/tap/flakestat , then the quickstart . Nothing to sign up for. ------------------------------------------------------------------------------ ## flakestat vs BuildPulse URL: https://flakestat.com/compare/buildpulse/ BuildPulse is a hosted flaky test service that ingests your CI results and ranks flaky tests in a web dashboard. flakestat is a single binary that does the detection part locally, for free, with your test data never leaving your machines. Both read the JUnit XML your runner already writes. The difference is where the analysis happens, what it is allowed to claim, and whether you can check that it works. What flakestat does differently It ranks by inconsistency, not failure rate. A test that fails every single time is not flaky, it is broken, and the two need completely different fixes. flakestat scores how often a test disagrees with itself between runs, so an always-failing test scores 0.00 and is reported separately as consistently-failing instead of topping the list and costing somebody an afternoon. Every verdict carries a confidence level. A score of 0.62 from three runs and 0.62 from three hundred are different claims. Classification uses a lower bound on the score rather than the score itself, so a small sample can never reach a confident verdict no matter how dramatic the failures look. You can verify the detection works. Two commands reproduce a before and after against somebody else’s bug: ConduitIO’s repository at the commit before their own deflaking fix, and at the fix. Three tests come back flaky on one side and stable on the other. No hosted service lets you audit its scoring this way, because the scoring is the product. Copy git clone https://github.com/rowhitswami/flakestat && cd flakestat ./scripts/reproduce-validation.sh It refuses to claim causation. When failures cluster on Windows it says they cluster on Windows. When os and arch vary together, as they do on most CI matrices, it says the observations cannot tell which one matters rather than picking one. More on that . The history is a file you own. Append-only NDJSON in your repository or your artifact store. You can read it, diff it, merge shards with cat , and take it with you. There is no export step because there is nothing to export from. Side by side flakestat BuildPulse Cost Free at any volume, MIT licensed Per seat or per run Where analysis runs Your machine or your CI runner Their service Test data leaves your machine No Yes, results are uploaded Works before you push Yes, hunt reruns locally No, it needs CI results Scoring you can audit Yes, readable source plus a reproduction script Proprietary Broken separated from flaky Yes, consistently-failing scores 0.00 Varies Confidence on each verdict Yes, and thin evidence is refused Varies History format NDJSON you own Their database Setup One binary, no account Account plus CI integration Languages Any that writes JUnit XML Many Dashboards and history UI No, terminal and CI job summary Yes Org-wide rollups, alerting, ownership No Yes Auto-quarantine in the platform Emits a skip list you apply Yes, managed When flakestat is the better choice Test data cannot leave your infrastructure, whether from regulation, private code, or policy. You want to catch a flake before pushing, not after CI reports it. The budget for this is zero, or the volume makes per-run pricing awkward. You want to read the scoring and check it yourself rather than trust a number. You want one tool across a polyglot monorepo, because the input is JUnit XML rather than a language integration. When BuildPulse is the better choice Worth saying plainly, because a comparison that finds no case for the alternative is an advertisement. You want a dashboard non-engineers can read. You need rollups across many repositories and teams. You want alerting, ownership routing and SLA tracking. You would rather buy the whole workflow than assemble it. flakestat does not try to do any of that. Can I use both? Yes, and it is a reasonable setup: the hosted service for org-wide visibility, flakestat locally so an engineer can reproduce and confirm a flake in ten minutes without pushing. They read the same JUnit XML and neither interferes with the other. Try it in two minutes brew install rowhitswami/tap/flakestat , then the quickstart . Nothing to sign up for. ------------------------------------------------------------------------------ ## Validating a flaky-test detector URL: https://flakestat.com/writing/validating-a-flaky-test-detector/ 8 September 2026 · Rohit Swami Validating a flaky-test detector Building it took about a week. Working out whether it actually worked took considerably longer, and produced better material. I once spent an afternoon on a flaky test that wasn't flaky. It sat at the top of a list ranked by failure rate, which seemed like a sensible way to rank flaky tests until I noticed it had failed on every run for three weeks. It wasn't nondeterministic. It was broken, and had been broken so consistently that the ranking put it exactly where the most nondeterministic test in the suite should have been. That is the whole design argument for the tool I ended up writing, so I'll state it once and move on: flakiness is inconsistency, not failure . A test that fails every time tells you nothing about nondeterminism. What you want to know is how often a test disagrees with itself . Score that instead, and the always-failing test drops to zero and gets filed under a different heading, where it belongs. flakestat does that. It reads the JUnit XML your runner already emits, scores transitions rather than failures, and attaches a confidence level to every verdict, because 0.62 from three runs and 0.62 from three hundred are not the same claim. One Go binary, no account, nothing leaves the machine. That part was a week. This post is about the rest. The awkward question How do you know a flaky-test detector works? It's a genuinely annoying question. You can write fixtures with planted flakes, and I did. A test that fails on a coin flip is easy to detect and proves almost nothing. Real flakiness is rarer, weirder, and entangled with the environment. And the failure mode you care about is silent: a detector that misses things looks identical to a codebase that isn't flaky. What I wanted was a case where somebody else had established the ground truth. Not my fixture, not my judgement. ConduitIO had one. Their contributors filed an issue documenting several flaky tests, named them, and later merged a commit that fixed them. That gives two commits, one either side of a repair I had nothing to do with, and a detector that works should say different things about them. Same protocol, two commits 612f5bfb, before their fix TestClient_NotFound flaky 0.66 TestClient_CacheMiss flaky 0.66 TestClient_CacheHit flaky 0.66 → 9e00e594, their fix TestClient_NotFound stable 0.00 TestClient_CacheMiss stable 0.00 TestClient_CacheHit stable 0.00 One commit apart. 60 of 90 observations failing on the left, none on the right. You can run that yourself: git clone https://github.com/rowhitswami/flakestat && cd flakestat ./scripts/reproduce-validation.sh Two minutes. It fetches their repository at both commits, runs the same sampling protocol at each, and prints the table. It also runs in CI on every build, so if their commits move or the script rots, it breaks on my end before it breaks on yours. I'd rather be judged on that than on anything I assert. The protocol was written down before any of it ran , which is the only way the results mean anything. Three things I got wrong The bugs were more instructive than the features, and they share a shape. The measurement was the signal I added a --parallel mode to run the suite several times at once. Pointed at spf13/cobra , it reported TestDeadcodeElimination as flaky at 0.60. It isn't. The test builds a binary at a fixed path, and concurrent copies were deleting each other's build. The tool had manufactured the exact phenomenon it was built to detect, then reported it with a straight face. Candidates found under --parallel are now re-run sequentially and demoted if they don't reproduce. I kept the mode rather than deleting it, because failing to reproduce in five runs is weak evidence of innocence, not proof. But the default is sequential, and the default is trustworthy. Duplicates suppress flakiness CI artifacts get collected twice. A job re-runs, two aggregators pick up the same shard, someone re-uploads. I assumed the risk was inflated confidence: more observations agreeing, tighter bound, smaller p-value, all resting on evidence that only existed once. It does the opposite, and it took a measurement to notice. A duplicate carries its original's timestamp. So it sorts next to its original, and a duplicate always agrees with itself. Duplication doesn't add noise, it adds artificial agreement . On a test failing 4 of 12 runs, ingesting the same reports twice moved the score from 0.64 to 0.30 while the apparent evidence doubled. Drag to duplicate the same observations Copies of each observation none Observations 12 Score 0.64 Verdict flaky The error runs towards false negatives. Duplication makes flaky tests look stable, which is the direction that loses them quietly. Every observation now carries the identity of the execution it describes, so a copy counts once. A genuine retry, which really did run the tests again, still counts. The same invariant, three times Two outcomes are evidence of nondeterminism only if everything that could legitimately change the result was held constant. Obvious once written down. I broke it three times. First branches: a test passing on main and failing on an in-progress feature branch, read as one chronological series, looks like repeated disagreement. Then platforms. A test that always fails on Windows and always passes everywhere else is perfectly deterministic on every platform. It scored 0.45, with an explanation asserting "direct evidence of nondeterminism". That one surfaced within minutes of pointing the tool at its own CI matrix. Then the display layer, which kept grouping by branch after scoring had moved on to execution context. The verdict was right; the evidence printed underneath it was wrong, marking "flip on identical code" at exactly the boundaries the verdict had ruled out. Arguably worse than being wrong outright, since the number a careful reader checks against was the one still misbehaving. There is now one definition of comparability and everything that displays transition evidence calls it. Three implementations that agreed by convention was the actual bug. A night spent failing to find something One hole I couldn't argue away: every flaky test the tool had found was already known to somebody. Conduit's were filed. So were the ones in the regression corpus. A detector that only rediscovers documented bugs is a plausible detector, not a demonstrated one. So I pointed it at six active Go projects overnight. Five finished the protocol: 335 executions, each a fresh process, shuffled, with a recorded seed so anything found would be reproducible by its maintainer rather than "run 47 failed". The sixth had a ten-minute baseline and would have taken fifty hours. It found nine real flaky tests. Seven were already filed. One had a fix open and unmerged since March. One had been caught by litestream's nightly race-detector sweep the week before. flakestat hit it in ten runs, which is a reasonable argument for concentrated repetition over nightly sampling, and not an argument for discovery. The two that weren't known looked promising for about an hour. One was an unreported intermittent failure in a 9.1k-star consensus library, clean against four separate cross-checks: no issue, no pull request, no commit, and absent from the project's own community-maintained list of flaky tests. Then I ran the experiment that mattered. test alone, -count=1 25/25 pass test alone, -count=3 25/25 pass full suite, -count=1, no shuffle 12/12 pass full suite, -count=1, shuffled 12/12 pass full suite, ./... -count=1 10/10 pass full suite, ./... -count=3, shuffled 2/31 FAIL It only failed under the exact conditions my harness imposed. Their CI runs -count=1 . The other unreported finding turned out to be the same category: a package that can't be run with -count>1 at all, which is a real problem worth telling them about and is not flakiness. So: zero previously-unknown flaky tests. Stopping there was tempting. It was four in the morning and the result was exactly what I had been hoping for. Had I stopped, I would have filed a bug report that misattributed its own cause, and written a post claiming the tool found something nobody knew about. That's the --parallel mistake again. Same shape, different layer: the apparatus producing the signal. I've now made it twice in one project, which suggests it's less a bug than a standing hazard of measuring anything. What I'll claim Two things the evidence supports. Speed. Concentrated repetition beats nightly sampling. Litestream's sweep needed a week of nightly runs to surface a flake; ten runs on a laptop found it. Restraint. Across two clean repositories, 202 executions and 231 distinct tests, it reported nothing at all. It refused to classify a dramatic ten-minute hang on two observations, correctly, because two observations aren't a verdict. It called nine always-failing tests broken rather than flaky. A detector that finds something everywhere you point it is just a mirror. What I won't claim is discovery. It has never surfaced a flaky test nobody had already filed, and the write-up says so in the same words I'd use if it had. I think that's the more useful post anyway. There is a lot of tooling that tells you what it found. There is less that tells you what it looked for and missed. flakestat is MIT-licensed and reads the JUnit XML your test runner already writes. brew install rowhitswami/tap/flakestat , npm install --save-dev flakestat or pip install flakestat . Documentation · Source · Full validation record · The overnight hunt ------------------------------------------------------------------------------ ## How flakestat was validated URL: https://flakestat.com/validation/ Validation record Updated 8 September 2026 VALIDATION.md Written before any external experiment was run, and committed so its timestamp is checkable. Everything below is fixed in advance: subjects, stopping rules, frozen configuration, and what each outcome is allowed to mean. Deciding what counts as success after seeing results is how a detector gets graded on noise. Results at a glance Three external subjects and this project's own suite, all scored with one frozen build. Written after every experiment finished; the contract that grades them was committed before any of them ran. Subject Ground truth established by Outcome A playwright-flaky-tests fixture author, purpose-built 10 intentional flakes detected at high confidence; 5 controls clean at 0/100 B techstories-demo-app fixture author, app-shaped, real PostgreSQL 5 flaky, 5 consistently-failing, 57 stable, 0 suspect C ConduitIO/conduit the project's own contributors flaky 0.67 before their fix, stable 0.00 after self flakestat's own CI none known 293 tests, 10,305 observations, all stable No bug row in the contract ever fired. Nine always-failing tests across A and B were called consistently-failing , not flaky. No healthy test was flagged anywhere. No association was reported from evidence below the thresholds. What each subject is worth C is the load-bearing result. The defect was documented by Conduit's contributors, the tests were named by them, and the repair was written by them. all before this tool was pointed at the repository. flakestat was handed observations from both sides of a commit it had no part in and separated them: three of the four in-scope tests flaky at 0.67 with high confidence at 612f5bfb , and stable at 0.00 at 9e00e594 , under a protocol identical on both sides and fixed in advance. A and B establish that the classifier separates cleanly when ground truth is known, including the distinction that motivates the whole design. Nine tests failed 100 out of 100 times. A detector ranking by failure rate would put all nine at the top of a flaky list; flakestat scored them 0.00 and filed them separately as broken. The self-measurement is specificity on real data. 293 tests over 33 runs across three platforms, with branch, os, arch and runtime all varying, the exact conditions under which earlier versions of the scorer manufactured phantom transitions. Zero false positives. What this does not establish Sensitivity below roughly 5%. Three tests across the subjects fired once or twice in a hundred runs and were correctly left stable ; that is the right reading of the evidence, and it is also the boundary at which this sampling approach stops being the right instrument. Discovery of unknown flakiness. Every flake found here was already known to someone. flakestat has not yet surfaced a flake nobody had filed, and nothing in this report should be read as evidence that it can. Two results that are worth more than the pass rate A null arm was published. The pre-registered -count=1 protocol found zero failures in a hundred executions of a suite its own maintainers had documented as flaky. Reporting only the -count=3 arm, which found everything, would have been exactly the adjustment this contract exists to police. Both are above. A contaminated run was discarded rather than reported. Subject B was first run with backup copies of the working tests left inside the project, which Jest collected; thirteen identities ended up with two implementations feeding one name. That run is void and was re-run clean. flakestat had been right about the corrupt input too, since one identity genuinely alternated on identical code, which is flakiness, but a result obtained from a broken fixture is not a result. The failure mode this guards against The tempting protocol is "run flakestat against real repositories until it finds something". Given enough repositories and enough executions, it always will, and the finding means nothing. So the central rule is: Absence of reproduced flakiness is not evidence that flakestat failed. If a project has a test that fails 2% of the time and our sample contains 200 passes, the correct output is silence. A detector cannot be graded against an event that did not occur in its input. Where that happens, the run is recorded as inconclusive for sensitivity , not as a pass and not as a failure. Frozen configuration Defaults are frozen as of this commit and must not be tuned in response to any external result . Tuning after seeing whether the tool detects a project's named tests would make the validation no longer external. scoring min_runs 5 ewma_alpha 0.3 same_commit_weight 3.0 suspect_threshold 0.05 flaky_threshold 0.10 branch_weight 0.5 medium_evidence 10 transitions high_evidence 30 transitions association min_group 10 min_others 10 candidate_diff 0.10 strong_diff 0.15 max_q 0.01 If a genuine defect is found, as opposed to a threshold one would prefer to be different, the fix is recorded here with the reasoning, and every prior subject is re-run against the corrected build. Subjects Ordered from strongest ground truth to weakest, so that the instrument is checked against known answers before it is pointed at unknown ones. A. Known positive control: uppadhyayraj/playwright-flaky-tests Deliberately contains a stable control alongside random, race, network/timing and shared-state flaky tests. Protocol: independent executions with framework retries disabled . Playwright retries would collapse a fail-then-pass into a single reported outcome, which is the framework's own flakiness handling standing in for the run-to-run history flakestat is supposed to measure. Expected: stable control -> stable intentional flaky tests -> suspect or flaky no healthy test -> flaky Not expected, and not checked: that a flakestat score equals the repository's advertised failure probability. A flake score measures inconsistency between consecutive runs; an advertised rate is a marginal failure probability. For a Bernoulli process the first is roughly 2p(1-p) of the second, so they are different quantities and agreement between them would be a coincidence. B. Realistic controlled positive: DataDog/techstories-demo-app An actual application with Jest and Cypress, with deliberately flaky integration scenarios kept separate from the normal suite: concurrent registration, database timeout simulation, network latency, session-state races. This adds a second ecosystem and application-shaped behaviour. Expected: intentionally flaky cases accumulate temporal evidence; ordinary tests stay quiet; differing failure mechanisms need no special handling; JUnit dialect and test identity stay correct across two runners. C. Wild documented flakiness: ConduitIO/conduit Ground truth documented by the project's own contributors before flakestat touched it: an open issue (July 2026) reporting three consecutive CI reruns failing in unrelated suites before a fourth passed, naming TestServiceLifecycle_Stop/user_stop:_forceful TestClient_NotFound TestClient_CacheMiss TestClient_CacheHit TestEncodeDecode_ExtractAndUploadSchemaStrategy TestEncodeDecode_DownloadStrategy_Avro TestRandOld attributed to timing, shared registry/cache state, parallel contention and shared math/rand state. Being Go, gotestsum --junitfile produces JUnit XML with no modification to the repository. Amended before running: a before/after design Inspecting the repository first, as the contract intends, since the protocol must be fixed before results exist, turned up something better than the original plan. The issue is still open, but the named tests have since been repaired by the maintainers in an identifiable series of commits, and the project added its own flake-hunt.yml job that repeats the suite nightly. At HEAD those tests are expected to be clean, so pointing flakestat there would produce silence that means nothing. So subject C is run at two commits instead of one: C1 612f5bfb the parent of "test: deflake known-flaky tests from #2534" (#2537, 2026-07-06). Ground truth: documented flaky. C2 104f91a9 current HEAD, after that fix and the follow-up backlog commit (#2542). Ground truth: documented fixed. Both use the identical protocol. That converts a one-sided test into a controlled comparison whose ground truth, both the defect and the repair, was established by the project's own contributors, with no involvement from this tool: detected at C1, silent at C2 -> strong positive validation silent at both -> inconclusive for sensitivity flagged at C2 -> false positive, a bug silent at C1 but flagged at C2 -> a bug, and a serious one Scope is limited to the packages that commit touched, which hold four of the seven named tests: pkg/plugin/processor/builtin/internal/diff/lcs TestRandOld pkg/schemaregistry TestClient_NotFound TestClient_CacheMiss TestClient_CacheHit Executions use -shuffle=on , one fresh process each. These are order-dependent failures rooted in process-global state, a shared math/rand and a shared in-memory registry, so Go's default declaration order would produce the same outcome every run and no run-to-run variation to observe. Shuffling samples the orderings real CI and real developers actually encounter, and it is what the project's own flake-hunt job does. This is sampling the subject's behaviour, not provoking it: no test is modified, and the same protocol runs at both commits, so C2 has every opportunity to flake that C1 does. This is the only subject where catching a real flake is genuinely attempted. It is a bonus result, not a requirement. Subject A: results uppadhyayraj/playwright-flaky-tests @ dd4738a4 , 100 independent executions, --workers=1 --retries=0 , scored with the frozen build. Test Advertised Observed flakestat Score docs sidebar loads before content 30% 100/100 consistently-failing 0.00 API reference loads all section headings 15% 100/100 consistently-failing 0.00 cookie-reader: checks consent state n/a 100/100 consistently-failing 0.00 docs page loads within strict threshold 25% 44/100 flaky 0.35 homepage CTA renders in time 40% 40/100 flaky 0.45 concurrent page loads complete without timeout 20% 38/100 flaky 0.34 version badge matches expected 25% 32/100 flaky 0.38 docs search index loaded 30% 31/100 flaky 0.44 back navigation preserves scroll position 25% 29/100 flaky 0.42 cookie-polluter: sets analytics consent n/a 24/100 flaky 0.41 step-2: validate title from shared state n/a 20/100 flaky 0.32 step-3: assert visit count n/a 20/100 flaky 0.32 homepage loads within strict threshold 30% 18/100 flaky 0.20 navbar renders before JS finishes loading 35% 2/100 stable 0.04 image assets load before scroll interaction 20% 1/100 stable 0.02 step-1: capture homepage title n/a 0/100 stable 0.00 control · homepage has correct title control 0/100 stable 0.00 control · homepage has Get Started link control 0/100 stable 0.00 control · docs intro page loads control 0/100 stable 0.00 control · API reference page loads control 0/100 stable 0.00 control · navbar is present on all pages control 0/100 stable 0.00 Against the contract: Positive validation. Ten intentionally flaky tests reached flaky , every one at high confidence. Negative validation. All five controls sat at 0/100 and stayed stable . No false positive anywhere in the run. No bug row fired. Three tests failed 100/100 and were called consistently-failing , not flaky. Nothing healthy was called flaky. No association was reported from sparse evidence. Detection latency Measured from a verdict snapshot taken after every execution. Test 1st failure 1st contradiction → suspect → flaky homepage CTA renders in time (40%) 1 5 5 5 docs page loads within threshold (25%) 1 2 5 5 version badge matches expected (25%) 3 3 5 5 docs search index loaded (30%) 6 6 6 8 step-2 / step-3 shared state 9 9 9 10 Nothing was classified before --min-runs allowed it, which is why the earliest suspect is run 5. Every test failing 18% or more of the time was flaky within ten executions. Three fixtures were deterministic here, not flaky Named as flaky, they failed 100/100: docs sidebar loads before content : toBeVisible() fails outright. playwright.dev's DOM has changed since the fixture was written. API reference loads all section headings : "Expected ≥2 headings, found 1". Same cause. cookie-reader: checks consent state : needs a cookie set by an earlier test in the same browser context, which Playwright's per-test isolation prevents. flakestat called all three consistently-failing . That is the contract's "an always-failing test called flaky" bug row not firing, on data that would trip a failure-rate-based detector: each has a 100% failure rate and zero flakiness. Two fixtures barely fired, and were correctly not flagged navbar renders before JS finishes loading advertises 35% and failed 2/100 . image assets load before scroll interaction advertises 20% and failed 1/100 . flakestat scored them 0.04 and 0.02 and left both stable . For a Bernoulli process at p = 0.02 the expected flip rate is 2p(1-p) ≈ 0.039, so 0.04 is the right measurement of what actually happened. The gap is between the fixture's advertised rate and its behaviour in this environment, not between the evidence and the verdict, which is exactly why the contract forbids grading a score against an advertised probability. The honest reading: these two are inconclusive for sensitivity . A detector cannot be graded on an event that occurred twice in its input. Subject C: results Identical protocol at both commits: 100 independent executions, fresh process each, -shuffle= with a distinct recorded seed per execution. -count=1 -count=3 C1 612f5bfb , documented flaky 0/100 runs had failures 100/100 runs had failures C2 9e00e594 , the repair 0/100 0/100 What flakestat said At -count=3 , scored with the frozen build: Test External evidence C1 observed C1 verdict C2 observed C2 verdict TestClient_NotFound documented flaky, #2534 200/300 flaky 0.67 high 0/300 stable 0.00 TestClient_CacheMiss documented flaky, #2534 200/300 flaky 0.67 high 0/300 stable 0.00 TestClient_CacheHit documented flaky, #2534 200/300 flaky 0.67 high 0/300 stable 0.00 TestRandOld documented flaky, #2534 2/300 stable 0.01 * 0/300 stable 0.00 TestAlgosOld (and subtests) not implicated 0/300 stable 0.00 0/300 stable 0.00 * two contradictory outcomes in three hundred; see below. This is the contract's strongest row: detected at C1, silent at C2. Three of the four in-scope tests were called flaky at high confidence before the repair and stable after it, under a protocol that was identical on both sides and fixed before either ran. The value is in who established what. Conduit's contributors documented the defect, named the tests, and wrote the fix, all before this tool was pointed at their repository. flakestat was handed observations from both sides of a commit it had no part in, and separated them. Detection latency flaky by run 2 for all three. With -count=3 each execution contributes three observations, so run 2 is the first point at which six scored runs exist, one above the min_runs floor of five. Nothing was classified earlier than the evidence allowed. -count=1 found nothing, and that is the finding The pre-registered protocol said -count=1 . Under it, C1 produced zero failures in a hundred executions of a suite its own maintainers had documented as flaky. The reason is in the defect: these are process-global-state bugs, a shared in-memory registry and shared math/rand state, so the pollution has to happen within one process before a later test can trip over it. One repetition per process never gets there, however many processes you start. Conduit's own flake-hunt.yml uses -count=3 -shuffle=on for exactly this reason, and the original protocol under-specified by not matching it. Both were run and both are reported. The -count=1 result is not a flakestat failure and not a success: it is a detector correctly staying silent on an input that contained no contradictory outcome , and a reminder that a sampling protocol can be too weak to see a defect that is definitely there. Changing the repetition count after seeing a null result is the kind of adjustment this contract exists to police, so the honest handling is to publish both arms rather than the flattering one, and to note that -count=3 was adopted from the project's own reproduction recipe rather than tuned until something appeared. TestRandOld : two failures in three hundred Named in the issue and repaired by the same commit, but it fired twice in three hundred observations here and flakestat scored it 0.01 and left it stable . That is the right reading of the evidence in hand, and inconclusive for sensitivity , not a miss. The shared math/rand dependency it exercises is order-sensitive in a way that a hundred shuffles happened to trip only twice. Subject B: results DataDog/techstories-demo-app @ 1ca082de , 100 independent executions, Jest with no retries against PostgreSQL 16, the repository's own broken-tests/ swapped in over their working counterparts. 67 tests, 100 executions each: Verdict Count stable 57 flaky 5 consistently-failing 5 suspect 0 No stable test failed even once, and nothing landed in suspect . The separation was total: every test either fired repeatedly or never. Test Observed flakestat Score PostList expects PostListItem to be called 49/100 flaky 0.58 Post and Comment, can create a post 54/100 flaky 0.56 Database, email uniqueness race 39/100 flaky 0.54 User Registration, concurrent registration 55/100 flaky 0.47 SignUp, registration (flaky variant) 13/100 flaky 0.22 Header, renders the user's name 100/100 consistently-failing 0.00 Quotes API, four cases 100/100 each consistently-failing 0.00 PostList is the one fixture with a mechanism visible in the source: Math.random() > 0.5 . It fired 49 times in 100. That is the closest thing to a known-rate positive control in this subject, and the observation matches it. Detection latency: four of the five reached flaky at run 5, the earliest min_runs permits. The 13% case took until run 11. A contaminated first run, and what it showed The first attempt at this subject is void. Backups of the working test files were left in .originals/ inside the project , and Jest collected them, so five working files ran alongside the broken versions that replaced them. Thirteen test identities therefore had two different implementations contributing outcomes under one name. That run is discarded, not reported, and 100 executions were re-run against a tree where jest --listTests returns 18 files and a single run yields 67 testcases with no repeated identity. The comparison is worth keeping, because flakestat was right both times: Header renders the user's name when signed in contaminated: flaky 0.99 (working + broken version alternating) clean: consistently-failing 0.00 (only the broken version runs) Under contamination, one identity really did alternate between passing and failing on identical code, which is flakiness, and reporting it as such was correct analysis of a corrupt input. The fault was in the fixture, not the tool. It is a fair reminder that a detector can only be as good as the identity its inputs give it, and that -count -style repetition and accidental duplication look alike from the outside. Protocol amendments Recorded as additions with their reasoning. Earlier entries are left standing, because a preregistration that gets edited is not one. 2026-09-07: C2 tightened to the exact repair commit Originally C2 was HEAD . That answers a weaker question than intended: if C1 flakes and HEAD does not, the honest conclusion is only something between these commits removed the behaviour , not the documented repair removed it . Hundreds of unrelated commits sit in between. The comparison is now against the repair itself, with HEAD retained separately as a durability check rather than as the contrast: C1 612f5bfb parent of the repair documented flaky C2 9e00e594 the repair, #2537 documented fixed C3 104f91a9 HEAD, optional is the repair still holding? C1 -> C2 differ only by that commit, so a difference in behaviour is attributable to it. C1 -> C3 answers a separate and also useful question. No Conduit execution had been run when this was written. 2026-09-07: Conduit invocation stated explicitly go test -count=1 -shuffle=on -shuffle=on alone already defeats the test cache in this invocation, but -count=1 states the experimental requirement rather than relying on that: execute the tests, never reuse a cached result. go test prints the shuffle seed it used. That seed is recorded per execution, so any failure carries commit + runtime + test + shuffle seed + failure message and is reproducible by a third party, rather than being "run 47 failed". 2026-09-07: a defect found before the freeze, and how it was handled Checking the skip invariant surfaced an unrelated bug: the history strip in explain grouped transitions by branch while scoring grouped them by execution context, so the rendered evidence printed "flip on identical code" at every platform boundary. Verdicts were correct; the evidence displayed beneath them was not. It cannot affect any external subject, all of which run on a single machine with one platform, one runtime and one branch, so branch grouping and execution context coincide there, so the strip and the verdict agree by construction. It was fixed before the freeze rather than during the experiments. Subject A was already executing against the pre-fix build when this was found. Rather than restart it, note that execution and measurement are separable here: the raw evidence is the JUnit XML on disk, and scoring happens afterwards. Every subject's XML is re-ingested and re-scored with the frozen build before any result is reported, so all three subjects are measured by one implementation regardless of which build produced the XML. 2026-09-07: a perturbation during subject A, recorded not hidden Docker Desktop was started around executions 29-31 of subject A, in preparation for subject B, and its startup competed for CPU: execution time rose from ~110s to ~2min. Subject A includes wall-clock threshold assertions ("Docs page load took 5932ms - threshold: 4500ms"), so added CPU load can inflate exactly the failure rates being measured. Docker was stopped again and subject B deferred until A completes. The overlap is recorded here rather than corrected away: three of a hundred executions ran under load, which is noted beside subject A's rates so a reader can judge it. Nothing was re-run, because selectively discarding executions that ran under conditions one dislikes is how a measured rate becomes a chosen one. flakestat against its own suite Accumulated on the flakestat-history branch across every CI run of this project: 10,305 observations of 293 distinct tests over 33 runs, on three platforms. All 293 stable, no false positives. Not a sensitivity result, since nothing in that suite is known to be flaky, but it is specificity measured on real, unsynthetic data, from a matrix where branch, platform and runtime all vary and where earlier versions of the scorer produced phantom transitions. Frozen implementation Fixed for the duration of A, B and C. If a genuine correctness bug is found mid-experiment, affected results are invalidated, the build gets a new SHA recorded here, and every affected subject is re-scored from its retained XML. Nothing is quietly patched and continued. flakestat commit a4672ece (code identical to 465faaec; later commits in the range are documentation only) flakestat version dev (built from source) binary sha256 e5db674fe97f6de323f24f88a30f27282c4ccd4fb332ff710d07 cf1b332af760 go go1.25.4 host Darwin arm64 subject A uppadhyayraj/playwright-flaky-tests @ dd4738a4 npx playwright test --workers=1 --retries=0 --reporter=junit CI unset, so the repo's own config yields retries=0 subject B DataDog/techstories-demo-app @ (recorded when run) subject C ConduitIO/conduit @ 612f5bfb / 9e00e594 / 104f91a9 go test -count=1 -shuffle=on repo targets go 1.25.8 Descriptive metrics Captured for every subject and reported alongside the verdict. These describe behaviour; they are not success criteria and must not be used to move the bar set above. observations until first contradictory outcome observations until suspect observations until flaky final pass/fail counts final classification, score and confidence Detection latency is the interesting one, and is a far more meaningful property of a detector than whether a flake score resembles an advertised failure probability. Reported per test: test_random_failure first failure run 7 first contradictory pair run 7 reached suspect run 11 reached flaky run 24 final 74 pass / 26 fail, flaky, high confidence A verdict snapshot is written after every execution, so these are recovered from the record rather than estimated afterwards. Stopping rule For each subject, stop at whichever comes first: A. enough contradictory outcomes to cross the evidence threshold, or B. 100 independent executions 100 is chosen so that a missed detection is meaningful rather than unremarkable. Prior measured sensitivity was 100% recall at p >= 0.25 and roughly 80% at p = 0.10 with 50+ runs, so a test flaky at those rates that goes undetected in 100 executions is a real finding. Below p = 0.05 detection was already known to be unreliable, and silence there says nothing. What each outcome means Outcome Interpretation Known flaky test reproduces and flakestat detects it positive validation Known flaky test never fails in our sample, flakestat silent correct, but inconclusive for sensitivity Stable test stays stable negative validation Environment-specific deterministic behaviour becomes stable + association positive validation An always-failing test called flaky bug A healthy test called flaky from interleaving or context effects bug A correlation reported from sparse evidence below thresholds bug Wild undocumented flake found and reproducible major result, not required Reporting format Raw evidence is recorded next to the judgment, never replaced by it. No row states an expectation as though it were an observation: Test External evidence Observed flakestat stable-control stable 0/100 stable random-flake intentional 27/100 flaky TestRandOld documented wild 3/80 suspect TestClient_CacheHit documented wild 0/80 stable * * no contradictory outcome observed in this experiment; historical flakiness was not supplied to flakestat as input Status Subject State A. playwright-flaky-tests complete , see results below B. techstories-demo-app complete C1. conduit @ 612f5bfb (pre-fix) complete C2. conduit @ 9e00e594 (the repair) complete Subject A is pinned at dd4738a4 . Its "stable" control navigates to the live playwright.dev , so a control failure there is ambiguous between a tool error and a genuine network event; raw failure messages are kept so the two can be told apart rather than assumed. ------------------------------------------------------------------------------ ## Hunting flaky tests in open source URL: https://flakestat.com/findings/ Field notes Updated 8 September 2026 HUNT-FINDINGS.md Complete. Both unreported findings have since been filed with their maintainers: hashicorp/raft#711 and panjf2000/ants#401 . Ran flakestat's validation protocol against active open-source Go projects to answer one question the validation report leaves open: can it surface a flaky test nobody has already filed? Protocol Identical to validation subject C, so results are comparable: go test -count=3 -shuffle= fresh process per execution -count=3 because process-global-state flakes only surface with in-process repetition, which is what Conduit's own flake-hunt job uses. -shuffle with a seed chosen and recorded by the harness, so any failure handed to a maintainer is reproducible rather than "run 47 failed". Scored with the frozen build a4672ece . No repository was modified. Every candidate was screened first for existing flake-hunting: all 33 workflow files across the five repos were checked for shuffle , count>1 , scheduled test jobs and flake-named jobs. Results Repo Executions Distinct tests Failing tests Notes benbjohnson/litestream 100 1,438 1 rate 2/301 observations sourcegraph/conc 101 162 0 clean charmbracelet/bubbletea 101 69 0 clean hashicorp/raft 31 * ~500 7 flakiest suite by far panjf2000/ants 2 † 65 1 deterministic hang, see below etcd-io/bbolt not run n/a n/a 606s baseline; the protocol would cost ~50h * reduced from 100: baseline 131s, so -count=3 costs ~6.5min per execution and 100 would have consumed the whole window and starved the other repos. † full-suite run abandoned at 2 executions, because each hang costs the 10-minute Go test timeout, and replaced with a targeted diagnostic. Every real flake found, and whether it was already known Finding Rate Already known? raft TestRaft_HasExistingState 2/31 runs no, clean on four checks ants TestAntsPool hangs under -count>1 15/15 no, clean on three checks raft TestRaft_FollowerRemovalNoElection 4/31 yes, open PR #669, unmerged since 2026-03-19 raft TestRaft_SendSnapshotFollower 2/31 yes, issue #311, and listed in #372 raft TestRaft_ProtocolVersion_Upgrade_2_3 2/31 yes, listed in #372 raft TestRaft_RecoverCluster 2/31 yes, listed in #372 raft TestRaft_ProtocolVersion_Upgrade_1_2 1/31 yes, listed in #372 raft TestNetworkTransport_AppendEntriesPipeline_CloseStreams 1/31 yes, has prior issues litestream TestResumableReader_ContextCancelAbortsBackoff 2/301 yes, open issue #1502 Seven of nine were already filed. That is the honest headline of this exercise: projects with active maintainers usually already know. It is not a failure of the tool, it is what the world looks like. The two unreported candidates hashicorp/raft : TestRaft_HasExistingState testing.go:705: peer mismatch expected 2 servers [b3bfde62, c21909b3] observed 3 servers [b3bfde62, c21909b3, 1a02a2fe] Failed on runs 003 and 011 under independent seeds ( 758137489003 , 837114709011 ). A third node appears in a two-node configuration. Cross-checked at the time against four sources, all clean: issue search, PR search, commit search, and raft's own community-collected flaky-test inventory (issue #372, whose comments name twenty tests, and this was not among them). The only issue that mentions it now is #711, which is mine. Diagnostic results, and two corrections to my own reasoning. test alone, -count=1 25/25 pass test alone, -count=3 25/25 pass full suite, -count=1, no shuffle 12/12 pass full suite, -count=1, shuffled 12/12 pass full suite, ./... -count=1 10/10 pass for this test full suite, ./... -count=3, shuffled 2/31 FAIL The failure needs the full suite and -count=3 . Neither alone reproduces it in 74 attempts. I was wrong twice getting here. First I assumed repetition of the test itself was leaking state, and tested it in isolation, where it is clean. Then I assumed the trigger might be shuffle ordering, which arm B rules out. hashicorp/raft runs -count=1 in CI, so their CI cannot hit this. It is not a flaky test they experience. It is the same category as the ants finding: the package does not survive in-process repetition of the whole suite. panjf2000/ants : TestAntsPool -count=1 15 passed, 0 hung -count=2 0 passed, 5 hung (all rc=124) -count=3 0 passed, 15 hung (all rc=124) Deterministic, and the trigger is repetition itself rather than anything specific to three iterations: a single extra run of the test in the same process is enough. Thirty-five attempts, no ambiguity. The test binary times out at 10 minutes with TestAntsPool blocked; the goroutine dump shows testing.(*T).Run waiting while several pools' purgeStaleWorkers and ticktock janitors remain alive across iterations. Cross-check clean at the time: no issue, no PR and no commit mentioned it. The only one that does now is #401, which is mine. How to characterise it: a test-hygiene bug, not a flaky test and not a proven pool deadlock. It blocks go test -count=N , which is the standard way to hunt real flakes, so the practical impact is that this project cannot use the technique that finds genuine flakes. Same class as Conduit's "make entrypoint SIGTERM handling testable under -count>1 " fix. What flakestat itself did, precisely Worth separating, because it is easy to overclaim: Its protocol of repeated fresh processes, -count=3 , shuffled, surfaced every finding here. Its scoring correctly declined to classify the ants hang on two captured runs ( insufficient-data , not flaky ), which is the right answer on that evidence. A naive detector would have shouted about a 10-minute hang. The characterisation of both candidates came from targeted follow-up experiments, not from the tool. The tool contributed the sampling discipline and the restraint. It did not, on its own, diagnose anything. Does this close the gap? No. And the way it fails to is worth more than a weak yes. Nine real flaky tests were found. Seven were already filed by their maintainers. The two that were not, ants TestAntsPool and raft TestRaft_HasExistingState , are both artefacts of running a suite with -count>1 . Neither is a flaky test that the project's own CI can encounter. So the count of previously-unknown flaky tests found in the wild is zero . The protocol produced its own signal The raft finding failed only under the exact conditions the hunt imposed: -count=3 across the full suite. That is not a bug their CI can hit; it is a consequence of how the hunt was run. This project has been here before. From DESIGN.md, on --parallel : The deeper lesson: the measurement apparatus was itself a source of signal, which is precisely the failure this project exists to prevent. It happened again, in the hunt rather than the tool. Had I stopped after the first cross-check came back clean, with an unreported test, a real intermittent failure and a 9.1k-star library, I would have filed a bug report that misattributed the cause, and told you the gap was closed. The four experiments that prevented that cost about an hour. What can be said flakestat reliably surfaces real flakes in third-party code, including one with an unmerged fix open since March and one their nightly race sweep needed a week to catch. It stays quiet when it should: two repositories clean across 202 executions and 231 distinct tests, and it correctly refused to classify a dramatic 10-minute hang on two observations. Every genuinely flaky test it found was already known to its maintainers. It has still never surfaced one that nobody had filed. The honest claim for a launch post is the speed and the restraint, not discovery. Anyone writing "found bugs in real projects" from this data would be overstating it, and the third sentence of the FAQ would have to walk it back. Told the maintainers Both -count>1 findings are real, and both have the same practical consequence: the project cannot use go test -count=N , which is the standard way to find genuine flakes. Each was filed as what it is, a test-hygiene limitation rather than a product bug, with the reproduction attached and no claim about their CI. Finding Filed as raft TestRaft_HasExistingState under -count>1 hashicorp/raft#711 ants TestAntsPool hangs under -count>1 panjf2000/ants#401 Neither changes the count above. They were unreported when found, and they are still not flaky tests either project's CI can encounter. ------------------------------------------------------------------------------ ## Design notes URL: https://flakestat.com/design/ Design Updated 8 September 2026 DESIGN.md A language-agnostic flaky test detector. Single static Go binary, no SaaS, no account, no data leaving your machine. 1. Problem A flaky test passes and fails nondeterministically on the same code . Teams need to: Find them. Which tests are unreliable? Quantify them. How unreliable, and is it getting worse? Quarantine them. Stop them blocking merges without deleting coverage. Track them. Did that fix actually work? Today the good tooling is all hosted (Trunk, BuildPulse, Mergify, Qualflare). The open-source side is fragmented per-language plugins ( pytest-flakefinder , pytest-rerunfailures , Maven/Gradle retry) and dormant research code. There is no polished, universal, local binary. That is the gap. 2. Design principles Measure, don't guess. Rerunning a test until it fails proves flakiness exists; it doesn't quantify it. Scores come from pass/fail records across many runs. Language-agnostic via JUnit XML. Don't integrate with N frameworks. Integrate with the one format they all already emit. Local-first. History is a file in your repo, not a vendor's database. Degrade gracefully. No JUnit XML? Fall back to exit-code-only suite-level flakiness rather than failing. Single static binary. No cgo, no runtime, drops into any CI image. 3. Why JUnit XML It's the universal interchange format. Every major framework emits it: Ecosystem How Python pytest --junitxml=out.xml JS/TS jest-junit , vitest --reporter=junit Go gotestsum --junitfile out.xml Rust cargo nextest run --profile ci Java Surefire/Gradle native Ruby rspec_junit_formatter PHP phpunit --log-junit .NET dotnet test --logger junit Critical caveat: JUnit XML is not a real standard. There is no official schema, and vendor dialects differ. The parser must be deliberately tolerant of: root wrapper being present or absent (pytest omits it sometimes) Nested elements classname present, empty, or duplicated into name vs vs vs bare pass Surefire's / rerun markers, which are already flakiness signals and should be ingested as such Missing time , file , line attributes Invalid XML characters in failure messages (common with binary output in stack traces) This parser is the single highest-value component in the project. It's also where most competing tools are brittle. 4. Test identity A score is meaningless without a stable ID across runs. test_id = sha256(suite + "\x00" + classname + "\x00" + name)[:16] Human-readable fields are stored alongside for display. Parameterized tests ( test_foo[param1] , jest test.each ) get two IDs: the exact ID and a normalized ID with bracketed/parenthesized parameters stripped. This lets us report both "this one case is flaky" and "this whole parameterized family is flaky," which are different bugs. Test renames breaking history is a known v1 limitation. 5. Two operating modes This split is the core architecture. Both write to the same store. Burst mode: flakestat hunt Run the test command N times locally, right now. Code is constant, so any disagreement between runs is flakiness by definition. This is the strong signal. Use for: "is this test actually flaky?", pre-merge gates, verifying a fix. History mode: flakestat ingest + report Ingest JUnit XML from CI over time and score by flip rate. This is measurement across real-world conditions and catches environment-dependent flakes that a local burst never will. Use for: continuous tracking, trend detection, quarantine lists. Same-commit vs cross-commit weighting A subtlety most naive tools get wrong: in history mode, a test failing on commit A and passing on commit B may be a genuine regression that got fixed , not flakiness. So every observation records its commit SHA, and transitions are weighted: Same SHA, different result → definitive flakiness. Weight high (default 3.0 ). Different SHA, different result → ambiguous. Weight 1.0 . This is a meaningful accuracy edge over "count the failures." 6. Scoring Failure rate is the wrong metric. A test that fails 100% of the time scores 1.0 on failure rate but is not flaky. It's broken. Flakiness is inconsistency . For a test with ordered observations o_1..o_n (pass=1, fail=0; skips excluded): t_i = 1 if o_i != o_{i+1} else 0 # state transition w_i = same_commit_weight if sha_i == sha_{i+1} else 1.0 flip_rate = Σ(w_i · t_i) / Σ(w_i) Then an exponential recency weight with alpha (default 0.3 ) so recent behavior dominates and fixed tests decay back to stable. Age is counted in commits, not in observations . See the validation section; aging per observation capped effective sample size and made extra runs worthless. Confidence: below min_runs (default 5) a test is insufficient-data , never scored. Above it, classification uses a Wilson lower bound on the score rather than the point estimate, so a verdict requires evidence proportional to the claim. Classification (configurable thresholds; 0.10 is measured, not chosen): Score Class < 0.05 stable 0.05 – 0.10 suspect > 0.10 flaky Tests that always fail produce zero transitions → flip rate 0 → correctly classified as not flaky . They're surfaced separately as consistently-failing , since silently hiding a broken test would be worse than the flake. 7. Storage Constraint: no cgo, keep the binary static. Rules out mattn/go-sqlite3 . Decision: append-only NDJSON event log in .flakestat/runs.ndjson . Zero dependencies, git-friendly, diffable, trivially mergeable across CI shards Teams can commit it for shared history or ship it as a CI artifact Derived state is recomputed on read (fast enough well past 10^6 observations) flakestat compact collapses old observations into summaries when it grows If scale ever demands it, modernc.org/sqlite (pure Go) is the migration path. One observation per line: {"ts":"2026-08-17T10:00:00Z","run_id":"01J...","commit":"abc123","branch":"main", "source":"hunt","test_id":"9f2a...","suite":"tests.api","class":"TestAuth", "name":"test_login[oauth]","status":"fail","duration_ms":412, "message":"timeout after 5s","attempt":0} 8. CLI surface flakestat init # detect project, scaffold .flakestat.json flakestat hunt [flags] -- # run N times, detect disagreement flakestat ingest # load CI results into history flakestat report [flags] # scored table / json / markdown flakestat quarantine [flags] # emit framework-native skip list flakestat check [flags] # CI gate, meaningful exit codes flakestat compact # collapse old history hunt : capturing output across parallel runs Parallel runs need unique report paths. Two mechanisms, both supported: A {run} placeholder in --junit A FLAKESTAT_RUN env var injected into the child process flakestat hunt --runs 20 --parallel 4 \ --junit '.flakestat/reports/junit-{run}.xml' \ -- pytest --junitxml='.flakestat/reports/junit-{run}.xml' Key flags: --runs N , --parallel P , --until-fail (stop at first disagreement, for fast reproduction), --timeout , --filter . Fallback: if no JUnit XML is produced, record the process exit code and report suite-level flakiness with a clear warning that per-test granularity is unavailable. check : the CI gate exit 0 clean exit 1 new flaky tests above threshold (--fail-on-new) exit 2 existing flakes worsened (--fail-on-regression) Also emits GitHub Actions annotations and a markdown summary suitable for a PR comment. quarantine : framework-native output Emitting a generic list nobody can consume is a common failure mode. Emit what each runner actually accepts: Format Output pytest node IDs for --deselect go regex for go test -skip jest testPathIgnorePatterns / name patterns yaml generic flakestat.quarantine.yaml 9. Config: .flakestat.yaml Superseded. Shipped as .flakestat.json ; see §11. The values below are the original spec, not the shipped defaults. flaky ships at 0.10 , and quarantine.path and ignore were never implemented. §6 and the documentation are authoritative. This section is left as written so the reasoning behind the change stays legible. version: 1 command: pytest --junitxml={junit} junit: .flakestat/reports/junit-{run}.xml runs: 20 parallel: 4 scoring: min_runs: 5 ewma_alpha: 0.3 same_commit_weight: 3.0 thresholds: suspect: 0.05 flaky: 0.15 quarantine: format: pytest path: .flakestat/quarantine.txt ignore: - "tests/integration/**" Precedence: CLI flags > env vars > config file > defaults. 10. Package layout cmd/flakestat/main.go internal/cli/ command wiring, flag/config precedence internal/junit/ tolerant XML parser ← highest-value component internal/runner/ parallel execution, timeouts, output capture internal/store/ NDJSON append log, query, compaction internal/score/ flip rate, EWMA, weighting, classification internal/report/ table / json / markdown / gha renderers internal/quarantine/ per-framework emitters testdata/junit/ real-world XML dialects from every framework above testdata/junit/ matters more than it looks: a corpus of genuine XML from each framework is what keeps the parser honest, and it's the natural place for outside contributors to land a fix ("my framework's output breaks it, here's the file"). 11. Build order ✅ internal/junit + the dialect corpus, which everything depends on ✅ internal/store , append/read NDJSON ✅ internal/score , pure functions, heavily unit-tested ✅ hunt + internal/runner , first end-to-end user value ✅ report , table / JSON / markdown renderers ✅ ingest + check , the CI story ✅ quarantine emitters ◐ init and the config file done; compact outstanding ✅ Distribution: GoReleaser, Homebrew, ghcr.io, GitHub Action, npm, PyPI ✅ Branch-aware scoring Measured validation Two defects surfaced only once ground truth existed -- neither was reachable by unit tests or by the 21-repo sweep, because both required knowing the real flake rate in advance. Recency decayed per observation, so more runs bought no more confidence. Weights summed to at most 1/alpha , capping effective sample size at ~3.3 transitions. On p=0.25 , standard deviation across trials was 0.246 at 100 runs versus 0.255 at 10 -- ninety extra runs bought nothing. Recency now ages in commits : a burst shares one commit and therefore uses all of its evidence (sd 0.052 at 100 runs). Cross-commit decay is unchanged. Verdicts ignored sample size. A p=0.02 test was called flaky 25% of the time at 10 runs and 0% at 20 -- a verdict that improved with less data. Classification now requires a Wilson lower bound (with Kish effective sample size) to clear the threshold, so a verdict needs evidence. The flaky threshold is now measured. At 100 runs, 0.15 detected a p=0.10 test in 45% of trials; 0.10 detects it in 80%, with stable and broken tests still flagged 0% of the time. Default lowered to 0.10 . 0.08 was rejected for reintroducing lottery verdicts on p=0.05 . Still uncalibrated: same_commit_weight and branch_weight , since every validation run so far has been single-commit and single-branch. Two orthogonal questions Observations answer two questions that must not be collapsed into one: Observations | +-- temporal evidence -> classification + score + confidence | +-- contextual evidence -> associations + effect size + significance | v Explanation Neither branch may rewrite the other's conclusion. A test is flaky because its outcomes demonstrate flakiness; an association only says where that behaviour concentrates. Keeping them separate preserves information that a single label would destroy. stable with a strong os=windows association means the test is deterministic within each environment but behaves differently between them -- a different phenomenon from flaky with the same association, where one platform appears to increase nondeterminism. One combined class could not express both. If a vocabulary for that is ever added it should be a secondary descriptor ("context pattern"), not a sixth primary class. Comparability: the transition invariant A transition is meaningful only between observations from the same execution context. Execution context is currently: branch + os + arch + runtime.name + runtime.version and explicitly excludes provenance identifiers -- ci.run_id , ci.job_id and anything similarly high-cardinality. Including them would place every observation alone in its own context, leaving no transitions to measure anywhere. This invariant has now been violated three times, in the same way, at three different levels: Interleaved branches made a test that passed on main and failed on an in-progress feature branch read as repeated disagreement. Interleaved platforms made a test that always fails on Windows and always passes elsewhere read as constant disagreement, scoring 0.45 with an explanation asserting "direct evidence of nondeterminism". The test is perfectly deterministic on every platform. The display layer kept grouping by branch after scoring moved to execution context, so the history strip printed "flip on identical code" at every platform boundary. The verdict was right and the evidence shown beneath it was wrong, which is arguably worse than being wrong outright: the number a reader would check against was the one still violating the rule. The first two were found only with real data. The third was found by asking whether a rule stated in one place was actually obeyed in every place that depends on it, a question worth asking of any invariant recorded here, since the comment in the offending function claimed agreement that had silently stopped being true. The structural fix is that there is now exactly one definition, score.ExecutionContext , and everything that presents transition evidence calls it. Duplicating the rule is what let it drift. The general shape is worth remembering when adding any new axis: two outcomes are evidence of nondeterminism only if everything that could legitimately change the outcome was held constant. Counting: the execution identity invariant Re-recording an execution must not create evidence. An observation describes one execution of one test. The log is append-only and designed to be merged with cat , so the same execution can reach it more than once: an artifact uploaded twice, a job re-run, a shard collected by two aggregators. Nothing in the record previously distinguished that from a second execution that happened to agree. Identity is derived from the evidence, never from ingestion: recorded context + report path + report digest + test id + repetition index Each part earns its place. The report digest separates a file from the file that later replaced it; the report path separates two documents from one job. The repetition index is not defensive: -count=12 puts twelve executions of one test in one document, and without it eleven results would vanish. The ci.attempt inside the context is what separates a legitimate retry -- which really did run the tests again -- from a duplicate. The recorded context is the whole dimension set, not a chosen few , because a provider's idea of a job can be coarser than an execution. GitHub reports the same GITHUB_JOB for every leg of a matrix, so flakestat's own three platforms ingest under one provider, one run, one job and one attempt; the only thing telling them apart is what each recorded about itself. An earlier version keyed on the CI fields alone and survived only because gotestsum happens to write the platform into a go.version property, making the digests differ. Measured with that luck removed, three legs of four observations each dedup to four -- two thirds of the matrix silently destroyed, with no way for dedup to know it had dropped anything real. That sets the bias for the whole mechanism: when in doubt, do not dedup. Missing a duplicate restores the old behaviour; a false dedup destroys evidence and says nothing. Nothing about when ingestion happened may enter the key, or re-ingesting would mint a fresh one and restore the problem. The harm was the opposite of the one anticipated. The expectation was that a duplicate would inflate confidence -- more agreeing observations, a tighter bound, a smaller p-value. Measured, it does the reverse. A copy carries its original's timestamp, so it sorts adjacent to it, and a duplicate always agrees with itself. Duplication therefore injects artificial agreements : a test failing 4 of 12 runs, ingested twice score 0.64 -> 0.30 lower bound 0.510 -> 0.230 transitions 11 -> 23 The evidence appears to double while the measured flip rate halves. The error runs towards false negatives -- a flaky test made to look stable, with more apparent support for the wrong answer. Duplication is not a bookkeeping nuisance; it is a way of losing flaky tests quietly. Dedup runs on read as well as on write, because cat never passes through the write path. Observations carrying no key -- hunt results, or records written before identity existed -- are always kept: hunt watched every execution happen, so its results cannot be duplicates, and discarding evidence that merely might be duplicated would be the worse error. Diagnosis is deliberately deferred Categorising causes -- timing, race condition, network, shared state -- is not unfinished work. It is deferred until observed signals justify each category. Nothing currently captured distinguishes a race from a slow network. Inferring it anyway would be the one failure this project exists to avoid: presenting a guess with the confidence of a measurement. The correlation layer states where failures concentrate and explicitly declines to say why, including when two dimensions are perfectly confounded and the data cannot separate them. Not making a diagnosis is a feature of the evidence model, not a gap in it. Branch awareness Transitions are computed within a branch, never across one . The original flat chronological series manufactured flips: a test passing on main , failing on an in-progress feature branch, then passing on main again reads as two flips when nothing about main changed. Grouping by branch removes that class of phantom signal outright, the same structural mistake as the cross-commit problem, one level up. Layered on top, disagreement off the default branch is scaled by branch_weight (0.5), since failures on a feature branch are frequently just unfinished work. The default branch is auto-detected from origin/HEAD , then main / master . Config file: JSON, not YAML §9 specified .flakestat.yaml . Shipped as .flakestat.json instead: YAML needs a third-party parser, and a dependency-free binary is worth more to the security-conscious audience that picks a local tool over a hosted one. The command accepts both a list and a plain string, so hand-editing stays pleasant. {junit} in the command expands to the resolved report path, so it is written once instead of being kept in sync in two places, the single biggest source of first-run friction. Revision from implementation The commit weighting was wrong as originally specified. The design called for score = sum(w*t)/sum(w) with w = commit_weight * recency . Because that normalizes by the same weight it multiplies by, a uniform commit weight cancels out entirely: an all-same-commit history and an all-cross-commit history scored identically . The weighting only ever did anything on mixed histories, which is not the comparison that matters. Fixed by normalizing on recency alone and modelling cross-commit disagreement as discounted evidence ( e = 1/same_commit_weight ) applied to the transition value. Same-commit flips now count fully, cross-commit flips count a third, the score stays bounded in [0,1] , and the absolute scores differ as intended. Also learned: text/tabwriter counts ANSI escape bytes toward cell width even with StripEscape set, so a column mixing colored and uncolored cells drifts. The report renderer pads manually against uncolored widths instead. --parallel manufactured false positives, and the docs recommended it. Found by dogfooding against five public repos. Parallel runs execute copies of the test command in one working directory, so any suite using fixed paths, ports or a shared database collides with itself. Against spf13/cobra this produced a wholly invented flaky verdict (score 0.60) that was indistinguishable from a real finding; the same suite was clean sequentially, and the test passed 8/8 alone. Worse, the README's headline example used --parallel 4 . Not universal -- jd/tenacity stayed clean at --parallel 4 -- so the fix is not to remove the feature. Candidates found under --parallel are now re-run sequentially and demoted from flaky to suspect if they do not reproduce. Demotion rather than deletion is deliberate: failing to reproduce in five runs is weak evidence of innocence, not proof. The deeper lesson: the measurement apparatus was itself a source of signal, which is precisely the failure this project exists to prevent. Always-skipped tests were reported as insufficient-data , which claims more runs would help. For a platform-gated test that is false at any number of runs. They now get their own verdict ( always-skipped ); pallets/click has 26. The CI gate as originally shipped was unusable. report --fail-on-flaky fails on any flaky test, which turns a repo with existing flakiness red the day it adopts flakestat, so the gate gets deleted. Replaced with check and a committed baseline (§8's --fail-on-new , which should never have been folded away): existing flakiness is grandfathered, and only new or measurably worsened tests fail the build. A --regression-delta keeps scoring jitter from failing builds, and FIXED tests are surfaced to prompt tightening the baseline. 12. Deliberately out of scope for v1 Web UI or hosted dashboard Root-cause analysis (test ordering, shared state, timing) Auto-retry during a test run, which is the framework's job Rename/refactor tracking across history Direct CI-provider API integrations (ingest XML artifacts instead) 13. Open questions Resolved since this section was written, kept because the record is the point: ✅ Name availability . 13 GitHub repos match "flakestat", all abandoned (max 4 stars). No established project to collide with. ✅ Module path . github.com/rowhitswami/flakestat is the real path. Published: v0.2.0 is on Homebrew, npm, PyPI, ghcr and the GitHub Marketplace. ✅ Config file . Implemented, and shipped as .flakestat.json rather than the .flakestat.yaml §9 specifies. See §11: YAML would have meant taking on gopkg.in/yaml.v3 , and the dependency-free go.mod was worth more than the syntax. §9 is left as originally written so the change is visible. Still open: ☐ Default same_commit_weight of 3.0 remains a judgment call rather than an empirical result. There is now data it could be calibrated against, in three external subjects and this project's own accumulated history, which grows with every CI run and lives on the flakestat-history branch, but nobody has done that work, and until someone does, 3.0 is a defensible guess and not a finding. ☐ Sensitivity below ~5% is unestablished. Several tests during external validation fired once or twice in a hundred runs and were correctly left stable ; that is the right call on the evidence and also the boundary where this sampling approach stops being the right instrument. ☐ No previously-unknown flaky test has been found. Every real flake the tool has surfaced in the wild was already filed by its maintainers. See HUNT-FINDINGS.md for the attempt that failed to change this, including a candidate that looked novel until four follow-up experiments showed it only failed under conditions the harness itself imposed. ------------------------------------------------------------------------------ ## Changelog URL: https://flakestat.com/changelog/ Releases Updated 8 September 2026 CHANGELOG.md Notable changes to flakestat. Versions follow semantic versioning , with the usual caveat that 0.x makes no compatibility promise. 0.2.1 - 2026-09-08 A pre-launch audit. One of these silently discarded most of your evidence, which for a tool that reports statistics is the worst kind of bug it could have had. Fixed ** in an ingest pattern matched almost nothing. flakestat ingest 'reports/**/*.xml' is the command in the README, in the npm and PyPI readmes, in action.yml , and in every CI recipe in the documentation. Go's filepath.Glob does not implement ** ; it reads the two stars as one, so the pattern meant "reports/ exactly one directory /*.xml". Reports written straight into reports/ , which is what hunt --junit 'reports/junit-{run}.xml' writes, never matched. Against eight flat reports plus one in a shard directory, 0.2.0 ingested 2 test results and reported confident verdicts on them; 0.2.1 ingests 16. There was no error either time. ** now means this directory and below. Patterns without ** are unchanged. go install produced a binary that reported dev . The version is stamped by GoReleaser through ldflags, which go install does not apply, so anyone using the Go path could not say which build they had. It now reads the module version from the build info, which for that path is the tag you asked for. A working-tree build reports its commit rather than a pseudo-version naming a release that was never cut. Security The installers verified checksums and then installed anyway when they could not. A missing checksums.txt , or an archive not listed in it, printed a warning and continued. Anyone able to block a single request had silently downgraded the install to no verification, on the path whose front door is curl ... | sh . All three now refuse. FLAKESTAT_SKIP_CHECKSUM=1 opts out and has to be set deliberately. Release binaries now carry build provenance. Verify one with gh attestation verify -R rowhitswami/flakestat . npm already published with --provenance and PyPI over OIDC; the GitHub release artifacts had only an unsigned checksums.txt . Minimum Go raised to 1.25.13. go.mod declared 1.25.4, which is the floor for anyone building with go install , and GO-2026-6088 in encoding/xml is reachable from the parser below 1.25.13. Released binaries were never affected; they are built with a newer toolchain, and flakestat's own parser depth guard rejects the nesting bomb regardless. Also: a security policy with the threat model stated, a contributing guide, issue templates, and private vulnerability reporting enabled on the repository. 0.2.0 - 2026-09-07 Everything the documentation describes now exists in the binary. v0.1.1 shipped six commands; this ships ten, plus the analysis that makes the verdicts worth reading. Added flakestat explain shows the full evidence behind one verdict: outcome history as a strip, how many disagreements happened on identical code, which commits and branches it was seen on, and where its failures concentrate. --json emits the same evidence for tooling. Confidence on every verdict , either low , medium or high , derived from how much evidence exists. A score of 0.62 from three runs and the same score from three hundred are different claims, and a small sample can never reach high . Classification uses a lower bound on the score rather than the score itself, so a verdict needs evidence rather than a lucky flip. Dimensions and association analysis . --dimension key=value , repeatable, records the platform, runtime and CI context an observation was made in. flakestat then reports where failures concentrate: Where the failures concentrate os=windows failures here: 12 / 12 (100.0%) elsewhere: 0 / 24 (0.0%) difference: +100.0 pp Findings must clear an evidence floor, an effect-size floor and a Benjamini–Hochberg correction, because testing several dimensions will otherwise turn up something significant by chance. Associations never influence the score, and the wording stays correlational: failures cluster on Windows, not Windows causes them. Where dimensions vary together, it says the observations cannot tell which one matters. Only a whitelist of known CI variables is read, and only JUnit properties flakestat recognizes. The process environment is never scraped, so secrets cannot reach your history. Execution identity . Every observation carries the identity of the execution it describes, so an artifact uploaded twice, a re-run aggregation step or a shard collected by two jobs counts once, while a genuine retry still counts. This mattered more than it sounds. A duplicate carries its original's timestamp, sorts beside it and always agrees with itself, so uncounted duplicates make a flaky test look stable . Measured on a test failing 4 of 12 runs, ingesting the same reports twice moved the score from 0.64 to 0.30. The error ran towards false negatives. flakestat compact removes duplicate executions from the log file itself, which matters when the file is the record you keep. Refuses to rewrite a log containing unreadable lines, since reading skips those and rewriting would discard evidence you might still recover. flakestat ci-report renders job summaries and pull request comments. The GitHub Action gained comment , annotations and max-rows inputs; a re-run updates the same comment rather than adding another. --no-host on ingest , for jobs that aggregate artifacts produced elsewhere. Without it the aggregator's platform is stamped onto results from every other machine. Fixed Outcomes are only compared when they are comparable. A test that always passes on Linux and always fails on Windows is deterministic, but read as one chronological series it looked like constant disagreement, and it scored 0.45 with an explanation asserting direct evidence of nondeterminism. Transitions are now counted within one execution context: branch, os, arch and runtime held constant. The history strip agrees with the verdict. It grouped by branch while scoring grouped by execution context, so it printed "flip on identical code" at every platform boundary, at precisely the points the verdict had ruled out as incomparable. Execution identity uses the whole recorded context. GitHub reports the same GITHUB_JOB for every leg of a matrix, so three platforms can ingest under one provider, run, job and attempt. Keying on the CI fields alone would have merged them and silently discarded two platforms' evidence. Validation Validated against three external projects under a contract committed before any experiment ran, and scored with a single frozen build. Full report in VALIDATION.md . The load-bearing result: at the commit before ConduitIO's own deflaking fix, three of the four tests their issue named scored flaky at 0.67 with high confidence; at the fix itself, all four were stable at 0.00, under an identical protocol. Their contributors documented the defect, named the tests and wrote the repair. flakestat was handed observations from both sides of a commit it had no part in and separated them. Also recorded there: the protocol arm that found nothing, and a contaminated run that was discarded rather than reported. 0.1.1 - 2026-09-06 Fixed the Python wrapper reporting 0.0.0 regardless of the installed version, which made it build a download URL for a release that does not exist. The release workflow now verifies the built wheel reports the tagged version before anything is published. 0.1.0 - 2026-09-06 First release. init , hunt , ingest , report , check and quarantine , distributed via Homebrew, npm, PyPI, a container image, an install script and a GitHub Action. Yanked from PyPI: the wrapper shipped with a hardcoded 0.0.0 version and could not download its binary. Superseded by 0.1.1. ------------------------------------------------------------------------------ ## Writing URL: https://flakestat.com/writing/ Writing How it was built, and what it failed to find. Essays and records from building flakestat. Essay 8 September 2026 Validating a flaky-test detector A week to build it. Rather longer to work out whether it did anything, and three bugs that all had the same shape. Read Validation record 8 September 2026 How flakestat was validated Three third-party subjects, one frozen build, and a set of rules fixed in advance about what each result would be allowed to mean. Read Field notes 8 September 2026 Hunting flaky tests in open source An overnight run against five active Go repositories, and why it closed nothing. Read Design 8 September 2026 Design notes Why flakiness is scored as inconsistency, and the three times that principle was implemented wrong. Read Releases 8 September 2026 Changelog Every release, and which changes move scores you have already recorded. Read ------------------------------------------------------------------------------ ## Flaky tests by framework URL: https://flakestat.com/flaky-tests/ By framework Find flaky tests in your suite. One tool, whichever runner you use. Each guide covers the reporter flag, the command, and how to read what comes back. Python Flaky tests in pytest Using the JUnit XML pytest already writes, with no plugin to install. Read JavaScript and TypeScript Flaky tests in Jest With jest-junit, locally or from the runs your CI already does. Read Go Flaky tests in go test With gotestsum, scored properly rather than eyeballed across reruns. Read ------------------------------------------------------------------------------ ## Alternatives URL: https://flakestat.com/compare/ Alternatives How it compares. Hosted services do dashboards, rollups and alerting well. flakestat does the detection locally, for free, with the scoring open to inspection. Both comparisons say where the other one wins. Hosted flakestat vs Trunk Flaky Tests Local and auditable against hosted and managed, and when each is right. Read Hosted flakestat vs BuildPulse Same comparison for BuildPulse, including what flakestat deliberately will not do. Read ------------------------------------------------------------------------------