Skip to content

Releases

flakehound v0.1.3

Choose a tag to compare

@github-actions github-actions released this 13 Nov 03:46

Security

  • Redaction now fully removes GitHub's new stateless App installation tokens (including
    Actions' GITHUB_TOKEN): ghs_ + a ~520-character JWT with dots. Before, only the part
    up to the first dot was redacted, so the rest of such a token could appear in a report
    if a test printed it (the exact value of a *TOKEN* environment variable was already
    redacted separately).

Fixed

  • Demo: the upload test's margins now also work on Windows with Python 3.10, where the
    shortest possible sleep is ~15 ms (the test waits 0.15 s for 0.03 s of work).

flakehound v0.1.2

Choose a tag to compare

@github-actions github-actions released this 12 Nov 18:13

Fixes found by running flakehound on click, attrs and python-dateutil.

Added

  • A run that hangs and hits --timeout now names the test it was stuck in.
  • OpenSSF Scorecard workflow and badge (independent check of the repo's security practices).

Fixed

  • The thread-stress probe could be 50× slower than a normal run (it timed out on click's
    suite on Windows): it now only yields to other threads when there are other threads,
    so single-threaded tests run at full speed.
  • Timezone findings are now checked against a control run with TZ set to the machine's
    own offset. A test that fails there too (it breaks whenever TZ is set, like two of
    python-dateutil's tests) is reported as "suspected", with the real reason and a
    matching fix, instead of as a confirmed timezone time bomb.
  • A probe failure that never happens again when the test is re-run alone (e.g. a
    Hypothesis deadline on a busy machine, seen in attrs) is no longer reported as a time bomb.

flakehound v0.1.1

Choose a tag to compare

@github-actions github-actions released this 11 Nov 13:14

Added

  • GitHub Action (uses: urumb/flakehound@...): installs flakehound from the action's own
    source, runs it with your options, adds the Markdown report to the job summary, and
    exposes exit-code and report outputs. Inputs reach the shell only via environment
    variables (no script injection).
  • Issue forms (including "flakehound got it wrong"), a pull request template, Discussions.

Fixed

  • Demo: the upload test's background work was too close to its wait, so on busy CI
    machines it could fail in normal runs; it now passes normally and still fails clearly
    when sleeps are shortened.

flakehound v0.1.0

Choose a tag to compare

@github-actions github-actions released this 10 Nov 14:26

First release. Python + pytest.

Detection

  • flakehound run: runs the suite many times in parallel with shuffled order and varied
    random seed and PYTHONHASHSEED; failure rates with 95% confidence intervals.
  • Tests that fail every run are rechecked alone before being called broken.
  • Probe runs find time bombs (UTC+14, UTC−12, just before midnight, last day of the
    month, New Year's Eve, Feb 29) and racy tests (main-thread sleeps 20× shorter;
    thread-switch stress).

Diagnosis (every verdict backed by real runs)

  • Order dependency: isolation with the failing runs' exact seeds, polluter or
    state-setter search (correlation fast path + parallel delta debugging), and the
    leaked state named (module globals, object/class attributes, env vars, cwd,
    sys.path, project files, logging).
  • Randomness vs set/dict ordering (hash seed), told apart by swapping one seed at a time.
  • Timezone and date/clock time bombs.
  • Sleep used as a wait, pinned to the exact sleep() line; race conditions.
  • Rule-based fix suggestions; repro commands that are run for real and marked verified.

Output and CI

  • Terminal report, JSON report (schema v3), Markdown report (--markdown), and the
    GitHub Actions job summary.
  • --fail-on to choose what fails a build.
  • Quarantine: .flakehound/quarantine.toml + pytest plugin (non-strict xfail or skip)
    • flakehound quarantine list|add|remove with diff and confirmation.
  • Works with projects that use pytest-xdist (-n auto in addopts).

Security and cost

  • Fully offline, no telemetry, secrets redacted from every report.
  • No shell commands; every child process tree is cleaned up on timeout or Ctrl+C.
  • Runtime dependencies: pytest, rich, and tomli on Python 3.10 only.

Known limitations

  • asyncio.sleep is not shortened by the timing probes.
  • State hidden in fixtures, databases or external services is not visible to the leak
    detector (the report says so instead of guessing).
  • Thread stress needs the race to happen around a Python function call.