Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReproCI

ReproCI captures the evidence surrounding a failed pytest job, packages the smallest trace-selected source set into a content-addressed artifact, and replays it locally in a process, a hardened Docker container, or a distributed worker.

This repository is an open-source public beta. Its security boundaries and validation claims are documented precisely; it does not claim perfect CI emulation, external adoption, or proven debugging-time savings.

What it captures

  • failing pytest node IDs, phases, tracebacks, stdout/stderr, and test timing;
  • Git commit, branch, dirty state, and credential-scrubbed remote;
  • Python, operating system, architecture, CPU count, and installed package versions;
  • safe CI/runtime environment fields and detected random/Hypothesis seeds;
  • hashes for failed tests, traceback source files, dependency/configuration files, and explicitly included files;
  • disk capacity/device/umask metadata and host names referenced by failures;
  • the original argv and exit code.

Secret-shaped environment variables are excluded. Network packet payloads, arbitrary files, process memory, and GitHub secrets are never captured.

Quick start

From the GitHub release wheel:

python -m pip install \
  https://github.com/johnquevedo/reproci/releases/download/v0.2.0/reproci-0.2.0-py3-none-any.whl
reproci capture --output failure.tar.gz -- python -m pytest
reproci inspect failure.tar.gz
reproci replay failure.tar.gz --runtime process
reproci replay failure.tar.gz --runtime docker --network none

capture preserves the wrapped command’s exit code, so it behaves correctly in CI. Use --always-zero only when another step is responsible for restoring the test result.

GitHub Action

- uses: actions/checkout@v4
- uses: actions/setup-python@v6
  with:
    python-version: "3.12"
- run: python -m pip install -r requirements.txt
- uses: johnquevedo/reproci@v0.2.0
  with:
    command: python -m pytest -q
    artifact-name: reproci-${{ github.run_id }}-${{ github.run_attempt }}

The composite action always uploads the artifact and then restores the test failure. v0.2.0 is the distributed-platform release and is listed on the GitHub Marketplace. Controlled local and owner-dogfood evidence does not establish external adoption, real-world reproduction rate, debugging-time savings, or production scale.

Distributed workers

export REPROCI_WORKER_TOKEN='choose-a-random-token'
reproci worker --host 127.0.0.1 --port 8090 --runtime process
reproci dispatch failure.tar.gz \
  --worker http://127.0.0.1:8090 \
  --token "$REPROCI_WORKER_TOKEN" \
  --runtime process

Workers verify the uploaded SHA-256 digest, enforce a 50 MiB request limit, bound concurrency, and expose /healthz and Prometheus-compatible /metrics. Supply several --worker flags for ordered failover. The protocol intentionally has no remote shell endpoint.

Sandboxing

Docker replay applies a read-only root filesystem, an unprivileged user, dropped Linux capabilities, no-new-privileges, PID/memory/CPU limits, an isolated temporary filesystem, and --network=none by default. Dependency installation is disabled unless --allow-install is explicitly supplied, because package builds execute untrusted code.

Process replay is convenient but is not a security boundary. Never use it for untrusted artifacts.

Fault injection

Pass a deterministic JSON profile:

reproci replay failure.tar.gz \
  --faults '{"seed":7,"latency_ms":50,"network_failure_rate":0.1,"dns_fail_hosts":["api.invalid"]}'

The beta supports socket latency/failure and DNS failure. Filesystem exhaustion, clock skew, packet recording, and syscall-level tracing are proposed work, not implemented features.

Verification

uv sync --extra test
.venv/bin/python -m pytest
.venv/bin/python benchmarks/benchmark_replay.py \
  --iterations 10 --output benchmarks/results-controlled.json
.venv/bin/python -m build --wheel
.venv/bin/python scripts/verify_clean_install.py \
  --wheel dist/reproci-0.2.0-py3-none-any.whl \
  --output validation/clean_install/results.json
npm install
npm test
docker build -t reproci .

Raw benchmark observations are checked in at benchmarks/results-controlled.json. It is a controlled synthetic benchmark, not external validation. See docs/benchmark.md and docs/validation.md before quoting any number.

Documentation

Project status

ReproCI is a production-oriented public beta: the core is tested, packaged, released on GitHub, and listed on the GitHub Marketplace. It has not been operated at scale, independently audited, published to PyPI, independently adopted, or externally validated. Apache-2.0 licensed.

About

Capture and replay pytest CI failures with content-addressed artifacts and isolated sandboxes.

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages