Skip to main content

flakehunt

Prove and narrow flaky test failures instead of rerunning blindly.

A flake is only worth fixing once you can make it fail on demand. flakehunt runs the suspect command in a loop (or across seed values), classifies the outcome honestly, and tells you the next probe to run.

$ flakehunt hammer "pytest -q tests/test_flaky.py" -n 20
command  pytest -q tests/test_flaky.py
runs     1:0 2:1 3:0 4:1 5:0 6:1
pattern  P F P F P F
verdict  FLAKY
advice   FLAKY confirmed: 3/6 passed, 3 failed. It's real. Bisect order/seed with the failing runs below...

$ flakehunt seeds "pytest tests/ -q" --from 1 --to 30

Three verdicts, three exit codes, no wishy-washy "seems flaky":

Verdict Exit Meaning
FLAKY 3 Some runs passed, some failed — a real flake. Narrow it.
BROKEN 1 Every run failed — a deterministic failure, not a flake. Reruns prove nothing.
STABLE 0 Didn't reproduce under these conditions; widen the probe before concluding.

hammer runs one command N times with early stop once a pass/fail pattern is established; it prints which runs failed, which tests fail how often, the first failing output, and per-run timings. seeds runs the command with each seed value (--flag defaults to pytest-randomly's --randomly-seed=, override it for any other seeded runner) and reports exactly which seeds reproduce the failure.

--json everywhere for scripts and CI. Python 3.11+, stdlib only.

Commands

flakehunt hammer "<command>" [-n 20] [--stop-after N] [--json]
flakehunt seeds "<command>" [--flag --randomly-seed=] [--from 1] [--to 20] [--json]

Install: pip install flakehunt — or from this repo:

pip install "git+https://github.com/juzorei/flakehunt#subdirectory=tools/flakehunt"

The companion agent skill lives in skills/flaky-test-hunting: confirm → narrow → fix → re-prove, with honest quarantine rules. Installing the skill: npx skills add juzorei/flakehunt.

Metadata

Release files for flakehunt 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flakehunt 0.1.0
File Size Uploaded Provenance Actions
flakehunt-0.1.0.tar.gz 6.8 kB With provenance Details for flakehunt-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flakehunt 0.1.0
File Interpreter ABI Platform Actions
flakehunt-0.1.0-py3-none-any.whl Python 3 none any Details for flakehunt-0.1.0-py3-none-any.whl

Total release size: 13.2 kB

Release files / flakehunt-0.1.0.tar.gz

Download URL flakehunt-0.1.0.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c686113e6be0646459862d3692aee40f957829db12ec09db23103758fdc610d0
BLAKE2b-256 checksum
How to use checksums
cbcb9cecf9b65d6ae7d38ae3baf26b0246643d470fae9bc90441adfde8dcc145
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / flakehunt-0.1.0-py3-none-any.whl

Download URL flakehunt-0.1.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77b164abbe576a4f5c4ddf7c48f01b2538a6cc117b980db6c5da990e1fc3938c
BLAKE2b-256 checksum
How to use checksums
bfe381fd738a3bce9531b4e6fdc56b0ec5334e2c74ba919d8981471328f78d19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Security for flakehunt 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for flakehunt-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page