Skip to main content

merge-carlo

Build Python License

An offline-first scenario explorer for pull-request review workflows.

How does additional AI-generated pull-request demand interact with constrained human review capacity, and which workflow interventions remain useful across plausible assumptions?

merge-carlo combines read-only GitHub metadata with explicit assumptions and runs repeated discrete-event simulations under alternative scenarios. It compares conditional simulated outcomes, not causal AI productivity gains. Its agents are ordinary software objects with stochastic rules, not language models. No part of merge-carlo calls an LLM or writes to GitHub.

Install

Requires Python 3.12–3.14. Install the CLI in an isolated environment with uv:

uv tool install merge-carlo==0.1.1

Alternatively, run python -m pip install merge-carlo==0.1.1 in a virtual environment. Installation downloads dependencies; the demo itself is offline.

First offline run

No credentials, repository checkout, or network access are needed after installation:

merge-carlo demo --out out/demo --seed 42 --replications 200

Open out/demo/report.md. It compares a baseline with additive AI demand, AI replacement, extended review duty, a reviewer absence, and hypothetical review bypass. The output includes review latency, throughput, queueing, uncertainty, and paired scenario deltas, alongside a model card and JSON/CSV artifacts.

Every major report section is labeled SYNTHETIC. The demo runs only the base assumption set, not full sensitivity analysis. Its two synthetic weeks are illustrative inputs, not measured team behavior or a policy recommendation. Active review effort is assumed; replacement changes origin only, not effort.

The output directory must be empty or absent; choose another directory to rerun. A fixed seed reproduces artifacts within the same dependency environment. For a locked development environment, see the contributor guide.

Status and limits

Pre-alpha. The offline demo, read-only collection, dataset inspection, Python API calibration, held-out descriptive validation, and persisted simulation/reporting are implemented. Calibration is a Python API, not a CLI subcommand. See implementation status for evidence and remaining gaps.

Authorized live GitHub integration has not been completed. No authorized dataset was collected for release evidence. Live collection, real-team calibration, and real-data validation remain unverified; synthetic fixtures and anonymous failure-path probes do not establish them.

  • No developer productivity scores, rankings, or inferred work hours.
  • No AI-authorship classifier; unknown work origin stays unknown.
  • No GitHub approvals, merges, labels, or reviewer assignment.
  • No source-code ingestion, LLM personas, automatic parameter tuning, or web dashboard.
  • No claim about defect escape, security risk, or the safety of review bypass.

Missing evidence, incomplete extraction, censoring, and unsupported quantities stay visible. Unsupported metrics are null with a reason, never favorable defaults. Read the model limitations before interpreting a scenario comparison.

Work with repository data

The supported path is collect → inspect → Python API calibration → simulate → report, with validate for prepared held-out replay evidence. Collection needs authorized GitHub access; subsequent analysis uses local artifacts. Calibration inputs and held-out evidence must be prepared explicitly, not inferred by a one-command pipeline.

Collect and inspect

Read-only cohort collection reads one explicitly selected, authorized repository. Supply GITHUB_TOKEN through the environment, never a command argument or configuration file. Keep the private workspace key outside the dataset:

merge-carlo collect --repo OWNER/REPOSITORY \
  --start 2026-04-01T00:00:00Z --end 2026-09-01T00:00:00Z \
  --out data/cohort --workspace /private/path/merge-carlo-key

The cohort includes PRs created in [start, end) and older PRs whose open or closing evidence overlaps that interval. --end 2026-09-01T00:00:00Z excludes PR creations at or after September 1; it does not truncate retained PRs' review or lifecycle history. Repeat with --resume to reconcile from page one. Incomplete collections exit 3 and retain explicit statuses. Readiness defaults to strict evidence handling; work origin stays unknown unless locally declared.

Inspect the dataset without the private key. This writes inspection.json and report.md with coverage, missingness, censoring, and extraction limitations:

merge-carlo inspect --dataset data/cohort/dataset.sqlite --out out/inspection

Calibrate, validate, and compare

Follow the Python calibration guide to prepare coverage, reviewer, and effort-assumption inputs and write models/repository/model.json, calibration.json, and model-card.md. Active review effort is an explicit assumption, never inferred from elapsed review delay.

With a prepared, versioned held-out replay evidence file, run descriptive validation. By default failed gates are warnings; --strict exits 4 when a declared criterion fails:

merge-carlo validate --input out/replay-evidence.json --out out/validation --strict

See validation for the evidence contract. Then simulate the saved model and generate a report from the result artifacts, without rerunning the simulation:

merge-carlo simulate --model models/repository/model.json \
  --scenarios configs/scenarios.yaml --out out/experiment
merge-carlo report --results out/experiment \
  --validation out/validation/validation.json \
  --out out/experiment/report.md --overwrite

Export the assumption and scenario schemas before authoring configuration:

merge-carlo schema --out out/schemas

Use the configuration guide and data-only examples. For collection through reporting across selected repositories, see the authorized local workflow. It reports blocked results when evidence is incomplete; it does not establish that live integration has already succeeded.

Automation

Exit codes: 0 success, 2 invalid input, 3 source or access failure, 4 a requested validation gate failed.

Add global --json before a command for machine-readable console output:

merge-carlo --json schema --out out/schemas

Each operational result or error is one JSON object containing status, exit_code, and message. Errors move from stderr to stdout in this mode; help remains human-readable. Exit codes and artifact contents are unchanged.

Development

Clone the repository for the pinned toolchain, locked dependencies, and tests:

git clone https://github.com/fmueller/merge-carlo.git
cd merge-carlo
mise run setup
mise run check

Inside the checkout, use uv run merge-carlo instead of the installed CLI. After setup, uv run --offline --no-sync merge-carlo also prevents package manager network access. See contributing; coding agents read AGENTS.md first.

Documentation

License

Apache-2.0. See LICENSE.

Metadata

Release files for merge-carlo 0.1.1

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

Source distribution (sdist)

Source distribution for merge-carlo 0.1.1
File Size Uploaded Provenance Actions
merge_carlo-0.1.1.tar.gz 88.8 kB With provenance Details for merge_carlo-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for merge-carlo 0.1.1
File Interpreter ABI Platform Actions
merge_carlo-0.1.1-py3-none-any.whl Python 3 none any Details for merge_carlo-0.1.1-py3-none-any.whl

Total release size: 187.2 kB

Release files / merge_carlo-0.1.1.tar.gz

Download URL merge_carlo-0.1.1.tar.gz
Size 88.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9249f14e75de76bcd72293dae65d18dd13e61632c00e7eec520bbb02989a152c
BLAKE2b-256 checksum
How to use checksums
a5f555827d2bbd718dab2cde5ef6a83c372e26ce9b78b37afd8478089a80e058
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 31, 2026.

Transparency log

Release files / merge_carlo-0.1.1-py3-none-any.whl

Download URL merge_carlo-0.1.1-py3-none-any.whl
Size 98.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5111426b64731158f75babf5775c969f2c5772efe177f3ca89b70b90d7faf207
BLAKE2b-256 checksum
How to use checksums
b952da2b9a1b09eab444884c4c6244fe862d69da58ef0fb2d7dbff2c0fea362b
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 31, 2026.

Transparency log

Security for merge-carlo 0.1.1

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 merge_carlo-0.1.1.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 31, 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.1 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