How Margin decides: the test, its limits and its audit.

Margin answers one question about a change to a model, prompt, tool or host: could it be worse than what you run today by more than you allow? The open-source referee and the hosted service run the same rule. Here it is in full, with its limits.

The change is often forced. OpenAI shuts down the gpt-5 snapshots on Dec 11 2026 and the dated gpt-4o and gpt-4.1 snapshots on Jan 14 2027 (OpenAI deprecations). Anthropic retires claude-opus-4-5 on Jan 22 2027 (Anthropic deprecations). An eval score also moves between two runs of the same system, so a rule like “block if it drops 3 points” can fire when nothing changed (our measurement).

The same model name is not always the same model. Artificial Analysis tested 103 hosted endpoints of six open models against each model’s own reference deployment, and 24 scored statistically below it, from output caps, shorter reasoning and tool calls returned in a different shape (Artificial Analysis, 9 November 2026). A change of host is a change worth checking.

The bar is relative

The candidate must keep at least 97% of today’s pass rate on your cases. Against a setup that passes 90%, that allows about 2.7 points; against one that passes everything, 3 points. The open-source referee uses 0.97; in the hosted service the bar is a per-task setting. Every result prints the one it used.

The paired test

Both setups run the same cases. A case both pass, or both fail, says nothing about the gap between them. Only the cases they disagree on carry evidence: the ones the change lost and the ones it fixed. From those counts Margin takes a one-sided 95% upper bound on how much worse the candidate could be (z = 1.645). If even that bound is inside the bar, the change holds up. If even the reading most favourable to the candidate misses the bar, it got worse. Anything between is too close to call.

The size floor

A clean sweep on a small suite is not proof. Two floors keep it from passing:

  • The bound never gets tighter than the “rule of three” (3 divided by the number of cases), so two setups that never disagree still need many cases to count as equal.
  • “Holds up” needs at least 100 cases against a current setup that passes everything, and 111 against one that passes 90%. No suite under 88 cases can clear the bar at all.

Trying several candidates

Try four models on the same cases, keep the best, and part of its lead is luck. So the test gets stricter with every candidate tried on overlapping cases (a Bonferroni correction):

  • 2 candidates: z = 1.96, and at least 125 cases.
  • 4 candidates: z = 2.242, and at least 163 cases.

The referee remembers what you tried in a local ledger, so renaming or trimming the cases does not reset the count. To confirm a winner cleanly, run it alone on cases none of the candidates saw.

What “too close to call” means

It is the answer when Margin cannot honestly give one of the others:

  • the bound neither clears the bar nor proves the candidate worse;
  • the suite is under the size floor for the number of candidates tried;
  • a case got no gradable answer (an error, an answer cut off at the length limit, a check that could not run). It is counted as unanswered, never as a pass or a fail.

It does not hide a loss. If the change is still worse than the bar allows with every unanswered case counted in its favour, the answer is got worse. With a too-close-to-call answer, Margin says why and how many cases the question needs, under the pass rate and candidate count it assumed. Run margin-referee fit before you spend anything to see it for your own suite.

The three answers

  • Holds up: quality is within the bar.
  • Got worse: quality is worse than the bar allows.
  • Too close to call: the cases cannot settle it.

Cost is a column on the result, not a fourth answer. When a change holds up and costs more, the record says so and paying for it is your call. Cost never turns a quality loss into holds up. Label your cases by segment and a segment proven worse makes the answer got worse, whatever the total says; mark a segment release-critical and the answer cannot be holds up until that segment holds on its own cases.

The tool and the API print these as ship, do_not_ship and not_enough_evidence, with ship_if_worth_the_cost when a change holds up and costs more.

Release rules

Before the comparison, a team can declare what vetoes a release: an empty answer, an answer that breaks a declared JSON schema, a refusal in phrases the team lists, a malformed tool call, or a case that must pass. A rule the candidate breaks on a case where today’s setup did not makes the answer got worse, whatever the score. A break on both sides vetoes nothing. An unknown rule type is refused, not ignored.

The result and the receipt record a SHA-256 of the rules, so a rule added after the results were seen is visible. A cheaper model that answers empty does not pass on its accuracy score.

This matters most when an agent writes both the code and its tests, because then a pass can mean a loosened test: in Anthropic’s own API rewrite about 98% of integration tests passed while about a quarter of production inputs matched, and an audit found more than 100 weakened assertions (Anthropic, 2026-11-25). Rules fixed before the results, hashed into the receipt and checked by a party that wrote neither the code nor the tests are the guard against that.

The evidence plan

Every result carries an estimate of how many cases would show the change holds the bar, and how many would show it worse, with repeats when repeats were run. The estimate is made under stated assumptions: the pass rates observed, the 97% relative bar, a one-sided 95% bound, and the candidates tried with their corrected z and floor. It is an estimate, never a promise that a given number of cases will settle the question.

The cost column

Every result prints cost per case on both sides. Cost per verified outcome is the cost of the calls plus the bill for running them, divided by the cases your own eval graded as passing, not the ones the caller declared a success. A cheaper route that fails more often can cost more per passed case. Cost never turns a quality loss into holds up. Until you supply a value for an outcome, Margin reports cost per outcome, not value per outcome, and says so.

One worked example

OpenAI’s gpt-6.2-sol against gpt-6.1-sol on 200 function-calling cases, a subset of Berkeley’s BFCL graded by our own converter rather than BFCL’s checker, and run once by us. Public cases, not a customer.

  • Today’s model passed 193 of 200; the candidate passed 177.
  • They disagreed on 16 cases: the candidate lost 16 and fixed 0.
  • The bar allowed the candidate to be 2.9 points worse. The 95% bound says it could be 11.3 points worse.
  • Even the most favourable reading misses the bar, so the answer is got worse.

provenance/public_suites_2026-11-27/referee_bfcl_complete.json, is_simulated=false

The method audit, 2026-11-28

Before anyone relies on a “holds up”, we attacked the rule ourselves: 10,000 seeded simulated runs per setting (seed 20261128), every answer computed by the referee’s own arithmetic, and a second opinion from a model of a different family.

What held. The one error the rule bounds at 5% is clearing a candidate that sits at or beyond the bar. On independent pass or fail cases it now clears one 4.25% to 4.90% of the time. Two identical systems were called worse at most 2.65% of the time. With the correction for several candidates, the best of four at the bar was cleared 4.0% to 4.6% of the time; without it, 8.9% to 14.7%.

What broke, and the fix.

  • Graded or repeat-averaged scores were counted by sign, so a candidate 3.7% behind was cleared 98% of the time at 500 cases. Fix: the bound now uses the real per-case difference. (D1, MAR-2325)
  • A noisy model judge loosened the bar, and more on a bigger suite: with a judge flipping 20% of grades, the clear rate rose from 5.4% to 7.6% as the suite grew. Fix: give the judge's measured false-pass rate and the bar is held on true pass rates. (D2, MAR-2326)
  • Cases that fail together in undeclared clusters of 20 cleared a candidate at the bar 20.0% of the time. Fix: the fit report now says when no groups are declared and what that costs. (D3, MAR-2327)
  • At a 95% pass rate the bound cleared a candidate at the bar 5.4-5.8% of the time, over its 5%. Fix: half a case is added to the upper bound only, and the rate is now 4.2% to 4.8%. (D4, MAR-2328)
  • The receipt and five other surfaces said the bar rises with each candidate. The bar is fixed; the confidence rises. Fix: the wording is corrected on every surface, and the receipt names the one-sided 95% bound. (D5, MAR-2329)
  • A source note quoted a line that did not support the claim cited from it. Fix: the verbatim sentence and its three caveats are in the note. (D6)
  • The fit line for a case that never failed pooled runs across models and assumed independent repeats. Fix: the line now says both. (D7, MAR-2330)

The floors that stayed. The size floors are unchanged: 100, 125, 147 and 163 cases for one to four candidates. They are floors, not a promise of an answer. On 150 cases at an 80% pass rate, an identical system was cleared 18.8% of the time before the fixes and about 16% after, so too close to call is the common answer at that size.

Still open. The judge fix assumes the judge errs the same way on both sides; one that prefers a model’s style is not corrected by it. The simulation is one family of pass rates with independent cases, and nothing in it re-grades anyone’s checks.

docs/research/METHOD_AUDIT_2026_11_28.md, scripts/method_audit_sim.py, docs/research/method_audit_2026_11_28/results.json

When the judge changes

If your cases are graded by a model, the judge is part of the instrument. Given scores from two judges on the same outputs, Margin puts the two gradings through the same paired test, in both directions, and says whether the judge change alone moves the result. So far it has run on our own project, not a customer’s.

A judge that passes failing outputs shrinks every gap, so a bar read on its grades is too loose, and more so on a bigger suite. Give its measured false-pass rate (margin-referee fit reports it against your human labels) and the bar is held on true pass rates instead.

The free tool runs the same check: margin-referee judge old.jsonl new.jsonl --scorer pass.

Why the check sits outside the change

The agent that made a change shouldn’t grade it. Replit’s swarm benchmark freezes each submission and grades it on a machine the agents cannot reach, with hidden inputs and a timer outside the code being timed, because agents game the score: METR caught models overwriting the timer, and one reported 10–100× GPU speedup came from a flaw in the evaluation sandbox (Replit, 2026-11-19). Margin does the same for a release. We sell no model and didn’t make the change, and the bar is set before we see a result.

How to check a receipt

A receipt is the result as an in-toto statement in a DSSE envelope. The hosted service signs it with an Ed25519 key and publishes the public key; one you write with the open-source tool is unsigned and says so. Anyone can check one without trusting us:

pip install 'margin-referee[verify]'
margin-referee verify receipt.json \
  --key-url https://trymargin.io/.well-known/margin-receipt-key

A valid signature shows who issued the record and that nobody edited it since. An edited receipt fails the check.

What a release check does not show

  • That your checks grade the right thing. Each case is graded by your own check.
  • That your cases cover what the change will meet in production.
  • That the cases are independent. Declare groups and the bound is taken over groups, not cases.
  • When Margin reads another platform’s experiments, it checks the decision on those cases and scores. It does not re-grade the labels.
  • That a person decided to ship. The record says what Margin answered, not what you did.

The rule itself is open source: margin-referee on GitHub, MIT licence.

Run the test on your own cases.