Skip to main content

Fault Finder

Fault Finder investigates Python memory retention and produces replayable HTML/JSON evidence. The Phase 1 implementation separates production observation, isolated investigation, and deterministic verification. It does not claim to detect every leak or support every language.

Install

Use Python 3.11 or 3.12:

python -m pip install fault-finder
faultfinder inspect path/to/project

Development

Requires CPython 3.11 or 3.12 and uv. From this directory:

uv sync --python 3.12
uv run pytest
uv run ruff check .
uv run mypy src/faultfinder

Try it locally

uv run faultfinder demo --case listeners --trusted-local
uv run faultfinder demo --case bounded_cache --trusted-local
uv run faultfinder inspect path/to/project
uv run faultfinder check path/to/project --trusted-local --tests tests

Each investigation creates .faultfinder/reports/<id>/report.html, evidence.json, a source snapshot and hash manifest. The demo is a seeded corpus, not a discovery in your application. Local mode is for your own trusted tests, inherits the controller's installed packages, and is not a security sandbox. Generated code cannot run in local mode.

Exit codes: 0 no evidence in the tested workload; 1 finding; 2 inconclusive/configuration. Skipped/xfail/failed tests invalidate a trial. Test workloads repeat whole suites after one warm-up suite; counts are suite iterations, not HTTP requests. Initially use a small test selection that can be repeated safely. No application payloads or stdout are saved.

Isolated execution and agents

uv run faultfinder check path/to/project --model YOUR_INSTALLED_OLLAMA_MODEL

The versioned base worker image builds automatically on first use when Docker is running. It installs the published Fault Finder version and pytest, not arbitrary application dependencies. Build a custom image with the project's pinned dependencies installed before investigation and select it with --image when needed. Runtime containers have no network. Missing packages or fixtures give an inconclusive result. Use your project's locked install method; do not resolve new dependency versions during trials.

Agent mode uses a local Ollama server on 127.0.0.1:11434. Investigator and planner inspect bounded source snippets, then produce a harness. A trusted worker measures weak references, allocations and path execution. A reviewer explains the measured result. Model-generated experiments can establish reproduced retention; an unreviewed model claim cannot establish the application's intended lifecycle. No model is silently downloaded or paid API invoked.

Use a hosted model API

Use a provider that implements bearer-authenticated Chat Completions. This runs in one terminal; no Ollama server is needed. Set LLM_API_KEY in your environment, or let the command prompt for it without displaying it:

faultfinder check path/to/project --provider api --api-url https://PROVIDER/v1/chat/completions --model YOUR_MODEL

For example, OpenAI uses https://api.openai.com/v1/chat/completions; Groq uses https://api.groq.com/openai/v1/chat/completions. Choose a model available in your own account. Use --api-key-env OPENAI_API_KEY (or another variable name) if you already store your key under that name. The endpoint must use HTTPS, except for loopback servers. The provider must return one JSON object in choices[0].message.content; malformed or incomplete answers are inconclusive. Only bounded source snippets and measurements are sent to the selected provider. Review code for hardcoded secrets first. Your provider may charge for these requests. Generated probes still run in Docker, so a running Docker engine is required. Projects with extra dependencies need a custom worker image.

Production observation

Wrap the ASGI application once:

from faultfinder.observer import FaultFinderASGI

app = FaultFinderASGI(app)

Run these in separate terminals/services:

uv run faultfinder watch path/to/project -- uvicorn app:app --workers 1
uv run faultfinder worker path/to/project --model YOUR_INSTALLED_OLLAMA_MODEL

The watcher records process memory and optional lifecycle counters. It queues sustained growth after warm-up. The worker deduplicates and investigates candidates in Docker. Source changes between observation and investigation invalidate the candidate. Without a model, the worker uses existing tests and produces weaker growth evidence. Idle applications provide no useful lifecycle evidence. Multiple processes are flagged as incomplete coverage.

Replay and retention

uv run faultfinder replay .faultfinder/reports/REPORT_ID --trusted-local
uv run faultfinder report .faultfinder/reports/REPORT_ID
uv run faultfinder prune --days 7

Replay validates source and plan hashes. Dependency fingerprints are recorded; Docker image IDs pin isolated replay. Local replay can differ if your environment changed. Keep the JSON and source bundle alongside the HTML. Reports require no external website or CDN.

Project structure

src/faultfinder/ contains discovery, observation, agent planning, execution, measurement, verification, persistence, reporting and CLI modules. tests/ exercises their contracts and end-to-end behavior. examples/ contains small applications for integration checks. docs/ holds the design and measured qualification results. Generated artifacts stay in .faultfinder/.

See docs/validation.md for what was actually tested and remaining production qualification. A reproduced memory increase is not automatically a verified leak or production savings.

Metadata

Release files for fault-finder 0.2.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 fault-finder 0.2.0
File Size Uploaded Provenance Actions
fault_finder-0.2.0.tar.gz 89.5 kB With provenance Details for fault_finder-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fault-finder 0.2.0
File Interpreter ABI Platform Actions
fault_finder-0.2.0-py3-none-any.whl Python 3 none any Details for fault_finder-0.2.0-py3-none-any.whl

Total release size: 124.2 kB

Release files / fault_finder-0.2.0.tar.gz

Download URL fault_finder-0.2.0.tar.gz
Size 89.5 kB
Tags Source
SHA-256 checksum
How to use checksums
aa660c08bd298c6a930bafceb7d538e02981abcdac6007d2b2dc00d6ecb4cd96
BLAKE2b-256 checksum
How to use checksums
c4e28835b1e061184a22b76336e45586635efd087c7e29e87829c43c3f358688
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 Nov 5, 2026.

Transparency log

Release files / fault_finder-0.2.0-py3-none-any.whl

Download URL fault_finder-0.2.0-py3-none-any.whl
Size 34.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
554fce516f0fef8ed320501464bb39566e7d23a64f32506c95448a0487c9d556
BLAKE2b-256 checksum
How to use checksums
b5f794cf2c8b7ac16a4fb1addd1f8b55b1aeda3fc1b005939e6393d808465be1
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 Nov 5, 2026.

Transparency log

Security for fault-finder 0.2.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fault_finder-0.2.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 Nov 5, 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.2.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