Polygraph

Checks every pull request's claims by experiment

Visit Repo
Polygraph banner

About

## The problem it 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 from `strasse` to `strae`. 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 raises `InvalidVersion`. 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 raises `TypeError`, 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](https://yvt94-polygraph.static.hf.space) · [Demo video](https://youtu.be/VFzUl18uwP8) · [Source](https://github.com/Thanatos9404/polygraph) · [Pitch deck](https://drive.google.com/file/d/1qhkE1zz1Kd63j91KUNJRkx0nBC0VPRRt/view?usp=sharing)

## Challenges we 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.py` at 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.

Screenshots

Polygraph screenshot 1Polygraph screenshot 2Polygraph screenshot 3Polygraph screenshot 4Polygraph screenshot 5

Team

From the public Devfolio project page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

Deflake

Finds flaky tests in a Python project, explains why each one flakes, writes a small fix that has to change the cause, proves the fix with repeated runs, and routes it either to an automatic pull request or to a person.

Honest Harness

Six fixes so the Hedera harness judges its AI coding agent's work correctly, plus Codex support.

ontographia-plm-demo

In-browser cross-document BOM checks on Relate, Neo4j's lightweight graph database: deterministic Intents compile to Cypher with provenance.