This guide installs the current development release, creates a three-file failing project, reduces it, and validates the exported evidence. The example is self-contained and does not access the network after installation.
ReproMin requires Python 3.9 or newer. The commands below use Bash or Zsh on macOS or Linux. Windows users can follow the complete PowerShell quick start, including the isolated installation, fixture creation, Doctor preflight, reduction, validation, and replay steps.
python3 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
REPOMIN_VERSION=0.1.0.dev9
python -m pip install \
"https://github.com/fly1d/repomin/releases/download/v${REPOMIN_VERSION}/repomin-${REPOMIN_VERSION}-py3-none-any.whl"
repomin --versionThe final command should print repomin 0.1.0.dev9. The
release page
publishes SHA-256 digests for users who need to verify the downloaded wheel.
demo_dir="$(mktemp -d)"
mkdir "$demo_dir/case"
cat > "$demo_dir/case/reproduce.py" <<'PY'
from pathlib import Path
import sys
text = Path("input.txt").read_text(encoding="utf-8")
if "keep-me" not in text:
print("DIFFERENT_FAILURE", file=sys.stderr)
raise SystemExit(2)
print("ORIGINAL_FAILURE", file=sys.stderr)
raise SystemExit(1)
PY
printf 'keep-me\nremove-me\n' > "$demo_dir/case/input.txt"
printf 'unrelated file\n' > "$demo_dir/case/unused.txt"Confirm the failure contract before reducing anything:
cd "$demo_dir/case"
python reproduce.pyThe command prints ORIGINAL_FAILURE and exits with status 1. This marker is
the oracle: ReproMin accepts a candidate only while the command still fails and
its combined output still matches that text.
repomin "$demo_dir/case" \
--command 'python reproduce.py' \
--match 'ORIGINAL_FAILURE' \
--adapter none \
--source-reducer none \
--text-file input.txt \
--output "$demo_dir/reduced"The output must be outside the source directory. ReproMin works in temporary copies and never overwrites an existing output path.
The reduced payload keeps the command entry point and the required input, but
removes unused.txt and the unrelated line from input.txt:
find "$demo_dir/reduced" -type f -print | sort
cat "$demo_dir/reduced/input.txt"Expected payload files:
input.txt
reproduce.py
The exact temporary path printed by find will differ. The remaining input
line is:
keep-me
The payload and its evidence sidecar are separate:
reduced/ reduced repository
reduced.repomin/report.json machine-readable evidence
reduced.repomin/REPOMIN.md human-readable receipt
Validate the report structure and the recorded payload fingerprint without rerunning the failure command:
repomin report validate \
"$demo_dir/reduced.repomin/report.json" \
--payload "$demo_dir/reduced" \
--jsonA successful result has "payload_fingerprint_verified": true. The JSON
omits the command, match expression, logs, and environment data, but includes
the resolved report and payload paths for CI diagnostics. Redact those paths
before sharing the JSON, or use --format markdown for the path-free
shareable summary. Inspect the payload and full report separately before
sharing either one.
To execute the recorded oracle again in fresh copies, first review the command
inside report.json, then explicitly allow replay:
repomin report replay \
"$demo_dir/reduced.repomin/report.json" \
--payload "$demo_dir/reduced" \
--runs 2 \
--yesThe default host backend runs the supplied command with your user account. It is not a sandbox. Only use it with repositories and commands you trust. The Docker backend reduces access when configured carefully, but it is not a complete security boundary either. Do not publish credentials, private URLs, proprietary source, customer data, raw logs, or environment values.
- Run the read-only doctor preflight before a larger reduction.
- Choose a language or build-tool workflow from the examples.
- Add a minimized artifact to CI with the GitHub Action guide.
- Read the two public upstream pilots for tsdown and pydoctor.
- Share a useful, inconclusive, or blocked trial with the user workflow feedback template.
For a Chinese version of the same first-run workflow, see the Chinese quick start.