Polygraph
Checks every pull request's claims by experiment
Created on 12th October 2026
•
Polygraph
Checks every pull request's claims by experiment
The problem Polygraph solves
Coding agents now open pull requests faster than people can read them, and every one of those PRs arrives with a confident description: "No behavior change." "Fixes the crash." "Routine dependency update." Review still means reading a diff, and a diff never runs. Tests stay green because they only check what someone thought to check. A dependency bump is worse: the diff is one line and the behavior change lives inside a library, so there is nothing to read at all.
Polygraph is a reviewer that does not take the description's word for it. Point it at a pull request and it:
- Reads the title, description, commits and linked issues and splits them into a claim ledger, including implied claims such as "no behavior change" for a refactor.
- Builds two universes: the code before the PR (A) and after (B), each with its own interpreter and, for real projects, its own venv with the project installed. A dependency bump really runs two library versions side by side.
- Designs experiments, writes executable probes, and runs every probe in A, in A again (calibration, to discard noisy inputs), and in B. The project's own test suite runs in both universes, and every agreeing input is timed.
- Rules on every claim (confirmed, contradicted, or unverified) and surfaces every undeclared behavior change with a witness: the same input, the output before, the output after.
- Ships the result as a PR comment, a verdict that can gate the merge, and a pytest file that pins each finding.
It runs as a web app with live streaming runs, a CLI, a GitHub Action, and an API.
Results
- AI-agent refactor, "No behavior change. All tests pass." Tests green, 2x speedup confirmed by timing, and
slugify('Straße')silently changed fromstrassetostrae. Verdict: inconsistent. - Dependency bump packaging 21.3 → 24.1, "routine maintenance". Polygraph found five undeclared changes, e.g.
sort_versions(['1.0.0', 'invalid.version'])now raisesInvalidVersion. A diff-reading review by the same Nemotron 3 Ultra approved it with zero findings. - An honest rounding fix: every divergence was declared. Verdict: consistent. Polygraph clears good PRs too.
- Real merged PRs in python-humanize: in #381 Polygraph found that
natural_list(None)used to return''and now raisesTypeError, mentioned nowhere in the PR. - A full examination costs 2 to 9 cents of inference and takes under two minutes.
How it works
- NVIDIA Nemotron on Nebius Token Factory, four tiers sized to their jobs: Nemotron 3 Ultra (claims, plan, verdict), Nemotron 3 Super (divergence explanations), Nemotron 3.5 Lightning (parallel probe synthesis), Nemotron 3 Nano (probe repair).
- An agent loop: plan, write code, run it, repair it, compare, judge, and plan again for claims still unverified. The final label is computed in code from the evidence ledger, not taken from a model's opinion.
- Tavily pulls the official changelog window for bumped dependencies so experiments target what actually moved.
- Spending safety: every model call reserves its worst-case cost before it is sent; lifetime, daily and per-run caps.
Links: Live demo · Demo video · Source · Pitch deck
Challenges I ran into
- Reasoning budgets. Nemotron 3 Ultra sometimes spent its whole budget thinking and returned no answer. Every structured call now names a required key and retries once with reasoning off.
- Real repositories are not importable as checked out. humanize generates
_version.pyat build time. Universes now get editable installs, and import failures raised inside project code are classified as environment problems instead of being "repaired" (which wasted credits). - Fairness. Our first real-world run called an honest PR inconsistent because the author's "800 tests pass" became "726 passed, 74 skipped" on our machine. Environment-dependent claims now earn review, not guilt, and a run where nothing executed is
inconclusive. - One cluster, many causes. Grouping divergences by function merged unrelated changes; Nemotron 3 Super now splits them by root cause.
- Noise vs. real change. Some outputs differ between two runs of the same code (timestamps, hash ordering, addresses). Running universe A twice and discarding inputs where A disagrees with itself removed those false positives.
Technologies used
