I Built a Jury for Pull Requests: What Fly.io Sprites Taught Me About "Tests Pass"

"Fixed weak password hashing. Unit and API tests pass. There is no performance impact."
Would you merge that? The unit tests did pass. So did the API tests. And login had become far too slow for its own performance budget.
For Fly.io's Hacksgiving I built Perjury: comment /perjury on a pull request and a jury checks every claim in its description, then replies on the same PR.
What's a Sprite?
A Sprite is a hardware-isolated Linux VM with a persistent disk. It sleeps when idle and has its own URL. Two features matter here:
- Checkpoint and restore: snapshot the whole filesystem, run something risky, rewind.
- Connectors: Fly stores your GitHub credential and adds it at a gateway, so the machine never holds a token.
The Starting Point
My first idea was a lie detector for coding agents. The surprise was that, in my trials, the agent didn't lie.
What it did instead was more interesting. Two runs fixed the same tax bug in opposite ways. Each wrote its own fake pricing service to match its own assumption, watched the test pass, and reported that a 100 order now came to 118. At most one could be right.
Nobody lied, and nothing was proven. That became the idea: check what a description says against what a clean machine shows. Pull requests are where those descriptions matter, so I moved the court there.
How the Jury Works
Two Sprites. The court judges. The defendant runs the PR's code.
- A
/perjurycomment wakes the court through a webhook - The court reads the PR through the GitHub connector
- It takes a checkpoint of the defendant, runs the repo's checks there, then restores it
- Claude, with no tools, splits the description into claims, and a frontend and a backend "juror" explain the results
- Code decides each verdict, and the court comments on the PR
For the security PR above, the reply looks like this:
| Verdict | Claim |
|---|---|
| PROVEN | Unit tests pass. |
| PROVEN | API tests pass. |
| FALSE | There is no performance impact. |
With the evidence attached: 5 logins took 839ms, budget is 250ms.
The model does not get a vote
The model only says which check a claim is about. The verdict is plain code:
if (!result) return ["unproven", "No check covers this."]; if (result.status === "skip") { return claim.holds ? ["hearsay", `Some tests in "${result.title}" do not run on a clean machine...`] : ["proven", `Some tests in "${result.title}" do not run on a clean machine.`]; } const passed = result.status === "pass"; return [passed === claim.holds ? "proven" : "false", /* reason */]; Hearsay is my favourite. "I tested the payment flow end to end" is not false when that test is skipped on a clean machine. It just rests on a setup only the author had.
Four Things Worth Stealing
1. A PR must not write its own exam
Each repo lists its checks in perjury.json. The court takes that file, and the ci/ scripts, from the base branch:
const COURT_OWNED = (path: string) => path === CONFIG || path.startsWith("ci/"); const kept = Object.entries(head).filter(([path]) => !COURT_OWNED(path)); const owned = Object.entries(base).filter(([path]) => COURT_OWNED(path)); 2. The webhook is only a hint
The court's URL is public, so it trusts nothing in the request body. It re-reads the comment from GitHub and acts only if the repository owner really wrote it:
const real = await getComment(repo, id).catch(() => null); if (!real) return "ignored"; const matches = COMMAND.test(real.body.trim()) && real.author_association === "OWNER" && real.issue_url.endsWith(`/issues/${number}`); Each comment ID is used once, so old comments cannot be replayed.
3. A sleeping VM does not finish your job
This one cost me. The webhook answered "The jury is out" and then nothing happened for four minutes, until something else woke the machine.
A Sprite with no open request can pause almost immediately, taking your background job with it. The fix is to hold it awake before you answer the request, using the Sprite's tasks API:
sprite-env curl -X PUT /v1/tasks/trial -d '{"expire":"30m"}' Then delete the task when the queue is empty. A trial now takes under a minute.
4. You can't point a connector at the platform itself
I wanted the court to control the defendant with no token at all, through a custom connector aimed at the Sprites API. Fly refuses: blocked: base URL targets the Sprites API itself. Fair. The court now holds a Sprites token restricted to the defendant's name, so it cannot even run a command on itself with it.
How to Use It
Add a perjury.json to your default branch. Each check is one shell command, and area picks the juror:
{ "checks": [ { "id": "unit", "area": "backend", "title": "Backend unit tests", "run": "go test -v ./..." }, { "id": "ui", "area": "frontend", "title": "Frontend unit tests", "run": "node --test" } ] } Open a PR, describe it honestly (or not), and comment /perjury. Setup takes two Sprites, one connector and one webhook; the steps are in the README.
You can read four real verdicts on the sample eshop PRs.
What It Doesn't Do Yet
- The Docker and Jenkins check only compares Go versions in the files. Nothing is built.
- The end-to-end test calls a running backend without a browser.
- The jury can map a claim to the wrong check, so the comment shows which check each verdict used.
- A PR's own tests could try to fake their results.
TL;DR
- Green CI is not the same as a true description. Check the claims.
- Let the model read, let code decide. And give it no tools when it reads untrusted text.
- Run checks on a machine you can rewind.
- Read the check config from the base branch.
- Treat a webhook as a hint and re-fetch from the source.
- Hold your Sprite awake before you answer a request that starts background work.
The full source:
singhAmandeep007 / perjury
A jury for pull requests: comment /perjury and every claim in the description is checked. Built on Fly.io Sprites.
Perjury
A jury for pull requests. "Tests pass, no performance impact." Would you merge it?
Comment /perjury on a pull request A court on a Fly.io Sprite runs the repository's checks on a second Sprite that is rewound afterwards, rules on every claim in the description, and replies on the same pull request.
Built for Fly.io Hacksgiving 2026.
See it judge: Go upgrade · security fix · payment status · price separators
What it solves
A pull request arrives with a confident description, often written by a coding agent. Reviewers read it and trust it. Green CI says what passed, not whether the description matches it, and not that a test was skipped. Perjury checks the claims, one by one, against what a clean machine shows.
How it works
- You comment
/perjuryon a pull request. - GitHub's webhook wakes the court Sprite. The court re-reads the comment through the…
PRs welcome. The jury will be waiting.
