A measurement harness for LLM-as-a-judge score stability.
Evaluation pipelines increasingly use a language model to score the output of another language model: rate this code 1–10, then gate a deploy, rank a candidate, or track quality over time based on the number. That number is being treated as a measurement, and a measurement is only useful if repeating it gives you the same answer. flipgate repeats the measurement — same judge, same rubric, same artifact — and reports how often the answer changes, with particular attention to the case that matters in production: a score crossing a pass/fail threshold.
This matters because judge scores are already wired into CI gates and eval platforms (Ragas, Braintrust, Langfuse, DeepEval, promptfoo all support LLM-judged metrics). If the same submission passes a gate on Monday and fails it on Tuesday with nothing changed, the gate is adding noise, not signal — and nobody notices, because each individual run looks plausible.
Three conditions, each isolating one source of instability:
| Condition | What varies | What it isolates |
|---|---|---|
| A. repeat | Nothing. Identical model, rubric, artifact, N trials. | Pure sampling variance — the noise floor of the judge itself. |
| B. paraphrase | The rubric wording. Same criteria, same scale, same output contract, reworded. | Prompt sensitivity. A judge measuring quality should not care how you phrase the question. |
| C. cosmetic | The artifact's surface form. Identifier renames, whitespace, comment rewording, import order — provably behaviour-preserving edits. | Depends on the rubric — see below. |
Condition C's meaning depends on which rubric it runs under, and the
distinction matters (--cosmetic-rubric, full treatment in
METHODOLOGY.md §2):
- Under the canonical rubric, which scores readability, identifier names and comment wording are readability — so a judge that scores variants differently has a defence. This sub-condition measures sensitivity to readability-relevant surface form: a real hazard for gates, but not proof of instrument error.
- Under the
correctness_onlyrubric, the judge is told to score only functional correctness, error handling, and edge-case behaviour, and to ignore naming, comments, formatting, and style entirely. The variants are machine-verified behaviourally identical, so here a score difference has no defence. This is the design's strongest signal.
Condition A is the control for B and C: deltas are read against the repeat
condition's noise, never against zero — under sampling noise a delta is
essentially never exactly zero, so "non-zero" is not a finding. The
authoritative check is a seeded two-sided permutation test on the
difference of means (shuffle count and seed printed with every p-value);
the generated report says so explicitly when a delta is not distinguishable
from noise. The cosmetic variants are verified
equivalent by test (tests/test_cosmetic_equivalence.py) using
alpha-normalised AST comparison, public-signature comparison, and an
identical behavioural battery under a controlled clock — if that test fails,
condition C results are invalid. Design rationale for the scored artifact
(deliberately middling, so scores are not pinned to the ceiling or floor) is
in samples/README.md.
Variance understates the practical problem, because scores are consumed through thresholds. flipgate's headline metric is flip rate: given a gate at threshold T, the probability that two independently sampled runs of the same evaluation land on different sides of it.
For n scores of which p pass the gate and f = n − p fail:
flip_rate = (p × f) / C(n, 2)
Worked example: 20 repeat trials of the same artifact under a gate of "score ≥ 7", scoring 15 passes and 5 fails:
flip_rate = (15 × 5) / (20 × 19 / 2) = 75 / 190 ≈ 0.39
Meaning: run this eval twice and there is a 39% chance the two runs disagree about whether the artifact ships. A mean of 7.2 with sd 0.8 sounds fine; a 39% gate disagreement rate does not. Both describe the same data. Flip rate is 0 when all runs agree (all pass or all fail) and is maximised at an even split.
Every flip rate is reported as point [lo, hi] — a 95% Wilson score
interval on the pass proportion, propagated through the flip-rate function.
At 20 trials, a measured 0.10 is consistent with anything from roughly 0.02
to 0.36; the interval, not the point, is the claim.
There is nothing to install. The harness is a single stdlib-only Python file;
tests are stdlib unittest.
- Python 3.9+
- Claude Code CLI (a recent
version — the harness uses
--safe-mode,--json-schema, and--output-format json), authenticated. Sweeps run throughclaude -p, so they consume subscription usage rather than metered API spend. Only needed for the default judge: with--judge-commandany shell command plays the part, and nothing about the CLI is required.
Sweeps invoke the CLI; the tests do not (no network, no CLI, safe for CI).
The results below are one judge, one rubric, one rate limiter, on one day. They are not your judge. The point of publishing the harness is that you can measure yours, so this section comes before the findings.
Write your rubric as a prompt template in a plain text file. It needs two
substitution fields — {task} and {artifact} — and it must state a JSON
output contract, because that is how the score is read back. Literal braces
(the ones in your JSON example) are doubled:
Review this submission against our house style.
Task:
{task}
Submission:
{artifact}
Respond with JSON only: {{"score": <int 1-10>, "reasoning": "<one sentence>"}}
Then point flipgate at it:
python3 flipgate.py gate \
--rubric-file rubrics/house_style.txt \
--artifact-file fixtures/pull_request_42.py \
--task-file fixtures/TASK.md \
--threshold 7 --trials 20 --fail-above 0.05That is the whole thing. It runs your rubric against your artifact 20 times and tells you how often two runs would disagree about the pass/fail line your pipeline actually uses:
flipgate gate — judge stability
judge : claude-code (sonnet)
rubric : house_style
artifact : pull_request_42
gate : score >= 7 passes
trials : 20/20 parsed
scores : 6×3, 7×15, 8×2
pass rate : 0.850 [0.640, 0.948]
FLIP RATE : 0.268 [0.099, 0.461] (95% Wilson on the pass proportion, propagated)
fail-above : 0.050
run_id : gate-20260824-093311-4f1c02
FAIL: flip rate 0.268 exceeds the 0.050 gate.
Two runs of this judge on the same artifact disagree about pass/fail roughly 27% of the time
(95% interval [0.099, 0.461]). Any pipeline decision taken at score >= 7 inherits that noise.
Full detail: python3 flipgate.py analyze --run-id gate-20260824-093311-4f1c02 --threshold 7
Every trial is stored in SQLite, so analyze can re-read the same run at any
other threshold afterwards without spending anything.
Other input flags, all repeatable or combinable, on both run and gate:
| flag | what it does |
|---|---|
--rubric-file PATH |
your rubric. Repeat it: the first file is the primary rubric, the rest are treated as paraphrases of it for condition B. |
--artifact-file PATH |
an artifact to score. Repeatable. |
--artifact-dir PATH |
load a whole directory (dotfiles and *.md skipped). |
--task-file PATH |
the task statement your artifact answers. A TASK.md inside --artifact-dir is picked up automatically. |
--judge-command CMD |
use something other than the Claude Code CLI as the judge (see below). |
--config PATH |
read any of the above from a JSON file. |
The <base>_cosmetic* naming convention carries over: put
widget.py and widget_cosmetic_a.py in the same directory and condition C
scores the variant against the base. That is how you ask "does my judge
notice a rename?"
If a rubric is unusable, flipgate says exactly what is missing before it
spends a single call — a missing {artifact}, an unescaped brace, or no
stated JSON contract are each their own message.
Config file. Everything above can live in a JSON file — JSON rather than
TOML because Python 3.9's stdlib has no TOML parser and this project has no
dependencies. Any key beginning with _ is ignored, which is how the file
carries comments; relative paths resolve against the config file's own
directory; and a flag given on the command line always beats the file, so
--trials 5 overrides "trials": 20 for a quick check.
python3 flipgate.py gate --config flipgate.json --trials 5examples/flipgate.example.json is an
annotated, runnable config: it points at the example rubrics, artifacts and a
stub judge shipped alongside it, so
python3 flipgate.py gate --config examples/flipgate.example.jsonexercises the entire path with zero model calls before you spend anything.
gate is the productised form of the repeat condition: one question, one
exit code. 0 if the flip rate is at or below --fail-above, 1 if it is
above, 2 for unusable inputs, 3 if the judge ran but returned too few
parseable scores to measure at all. --json puts a machine-readable verdict
on stdout and moves progress to stderr:
{
"artifact": "pull_request_42",
"exit_code": 1,
"fail_above": 0.05,
"flip_rate": 0.2684,
"flip_rate_ci": [0.0993, 0.461],
"flipgate_version": "0.3.0",
"inconclusive": false,
"judge": "claude-code (sonnet)",
"model": "sonnet",
"n": 20,
"pass_count": 17,
"pass_rate": 0.85,
"pass_rate_ci": [0.6396, 0.9476],
"resolved_model": "claude-sonnet-5",
"rubric": "house_style",
"run_id": "gate-20260824-093311-4f1c02",
"scores": [7, 7, 6, 7, 8, 7, 7, 7, 6, 7, 7, 8, 7, 7, 7, 6, 7, 7, 7, 7],
"threshold": 7.0,
"trials_parsed": 20,
"trials_planned": 20,
"verdict": "fail"
}A composite GitHub Action ships in this repository, so the same check is a few lines in someone else's workflow:
- uses: amirfandev/flipgate@main
with:
rubric-file: evals/rubrics/quality.txt
artifact-dir: evals/fixtures
trials: "20"
threshold: "7"
fail-above: "0.05"
# Report the number for a few weeks before enforcing it.
fail-on-gate: "false"It writes a summary table to the job summary and exposes verdict,
flip-rate, flip-rate-low, flip-rate-high, inconclusive, run-id and
exit-code as step outputs.
.github/workflows/example-gate.yml is
a complete working workflow (against the free stub judge, with the live
version alongside it, commented).
The intended use is not "run this on every push". It is: run it once before you trust a judge in a pipeline at all, and then keep it wired into CI on a schedule, or on changes to the rubric, so that a judge which has drifted — because the model behind the alias moved, or because someone reworded the prompt — shows up as a red build instead of as quietly wrong eval numbers.
Two honest cautions about the verdict:
- A pass at small
nis reported asPASS (inconclusive)when the interval still reaches above the gate. Twenty identical scores do not prove a judge is stable; they fail to prove it is not. The tool says so rather than handing you a green tick to over-read. - The decision is made on the point estimate, because a CI gate has to be a function of the measurement rather than of how wide the interval happens to be. The interval is always printed next to it.
--judge-command is the escape hatch, and it is deliberately the crudest
possible interface: a shell command. flipgate pipes the rendered prompt to
the command's stdin and also writes it to a temporary file whose path is
substituted for {prompt_file}; the command's stdout must contain a JSON
object with a score key somewhere (bare, fenced, or wrapped in prose — the
same extraction the CLI path uses). A non-zero exit is recorded as a failed
trial, not a crash.
python3 flipgate.py gate \
--judge-command 'python3 my_eval/judge.py {prompt_file}' \
--rubric-file rubrics/house_style.txt \
--artifact-dir fixtures --trials 20 --fail-above 0.05So OpenAI, a local model, your existing Ragas or promptfoo scorer, or a
committee of three behind a script are all measurable without flipgate
knowing anything about them.
examples/judge_stub.py is a ten-line example of
what the command has to do.
Measuring a judge costs model calls, and the harness will not pretend otherwise:
| what you run | calls |
|---|---|
gate --trials 20 |
20 |
gate --trials 50 |
50 |
run --conditions repeat --trials 20 |
20 |
run with all three conditions, 20 trials, 1 base + 3 cosmetic variants |
120 |
The arithmetic is trials × cells, and gate is deliberately one cell.
Twenty calls against one artifact is the honest minimum for a first answer,
and even then the interval is wide: a measured flip rate of 0.10 at n=20 is
consistent with anything from roughly 0.02 to 0.36. Halving the interval
costs roughly four times the trials, so decide what precision the decision
actually needs before buying it. Sweeps run through claude -p, so they
consume Claude subscription usage rather than metered API spend; under
--judge-command, cost is whatever your command costs.
Two ways to spend less: measure at the threshold you really gate at rather
than several, and re-read a stored run with analyze --threshold instead of
re-running it, which is free.
There is nothing to install — python3 flipgate.py works from a checkout.
If you would rather have it on your PATH:
pip install . # provides a `flipgate` command; still zero dependenciesThe sample artifacts and the published data live in the repository, not in
the wheel: the installed command is for pointing at your own inputs, and
git clone is the way to reproduce the study below.
# sanity-check the harness and the sample artifacts (no CLI calls)
python3 -m unittest discover tests
# full sweep: 20 trials per cell across all three conditions
python3 flipgate.py run --model sonnet --trials 20
# analyse, gating at score >= 7 (run ids look like run-YYYYMMDD-HHMMSS-xxxxxx)
python3 flipgate.py analyze --run-id run-YYYYMMDD-HHMMSS-xxxxxx --threshold 7
# useful variations
python3 flipgate.py run --model opus --trials 20 --conditions repeat
python3 flipgate.py run --trials 20 --no-schema # also measures parse reliability
python3 flipgate.py run --trials 20 --conditions cosmetic --cosmetic-rubric correctness_only
python3 flipgate.py run --trials 20 --seed 42 # fix the plan-shuffle seed
python3 flipgate.py analyze --run-id ... --threshold 6 --csv results/run.csv
# export the per-trial data + provenance metadata behind published numbers
python3 flipgate.py analyze --run-id ... --export-dir results/publishedTrials are stored in SQLite (results/flipgate.db), so runs are resumable in
the sense that every completed trial is durable, and analysis is re-runnable
at any threshold after the fact. analyze writes a Markdown report to
results/ and prints it. Notes on the mechanics:
- The trial plan is shuffled across conditions with a recorded seed, so condition is not confounded with execution order or cache warmth.
- Each run records provenance: Claude CLI version, resolved canonical judge
model, harness git SHA (suffixed
-dirtyif the working tree has uncommitted changes — a bare HEAD SHA over a dirty tree would be false provenance), start/end times, and the shuffle seed. Each trial records true start/end times, a global start-order sequence number, and the envelope's cache/thinking token usage. Raw CLI envelopes are kept per trial (truncated to 20,000 characters) for audit. - A
runclaims its--run-idatomically (the run row is inserted first, inside an immediate transaction) before any trial executes, so two near-simultaneous sweeps given the same id cannot both proceed and merge silently — one of them is refused. This also covers a run row left by a sweep that crashed before its first trial: it is not silently reused and its recorded config is preserved. Default run ids carry a random suffix on top of the one-second timestamp. Pass--appendonly if you genuinely want to add trials to an existing run, and expect a loud warning. - If a worker thread dies or the CLI misbehaves, the trial is recorded as a failure and the sweep continues; Ctrl-C cancels queued trials and keeps everything already completed.
- repeat / flip rate is the number to look at first. This is the disagreement probability of the eval with itself. If its interval sits materially above zero, every downstream use of this judge at this threshold inherits that noise.
- repeat / distinct and range show the raw spread: how many different
scores the identical question received.
mode shareis the fraction of trials that landed on the most common score (1.0 means every trial agreed); it is only meaningful for n well above 1, and the report prints "–" rather than a confident-looking 0.0 for single-trial cells. - cosmetic vs repeat mean delta — the verdict is a two-sided
permutation test on the difference of means (10,000 seeded shuffles, both
recorded in the report so the p-value is reproducible), read at the 0.05
level; a standard-error figure is printed as descriptive context only,
because a normal-theory two-SE rule is anti-conservative on small
discrete cells. Interpreted per rubric: under the canonical rubric a
confirmed delta shows sensitivity to readability-relevant surface form;
under
correctness_onlyit has no defence at all. A delta the permutation test does not confirm is noise and the report says so. The per-cell table shows whether a specific variant (e.g. renamed identifiers) moves the score consistently, and is authoritative — the pooled per-condition flip rate mixes deliberately different cells and is labelled accordingly in the report. - paraphrase vs repeat — same permutation-test reading, for rubric wording.
- flip rate depends on the threshold. A judge can look stable at T=5 and
unstable at T=7 if the score distribution sits near 7. The report prints
the flip rate at every integer gate from 2 to 10 so no threshold can be
cherry-picked; re-run
analyze --thresholdfor the exact T your pipeline uses.
Six runs against claude-sonnet-5 via the Claude Code CLI, all on 23
August 2026, all with 100% parse rate, all published in
results/published/. The primary one is
interleaved-001 — 200 trials covering all ten cells (three conditions,
both cosmetic rubrics) in a single run with the trial plan shuffled
under a recorded seed (20260823), so that no cell is confounded with
execution order, session, or cache warmth. Alongside it are two earlier
full sweeps, full-002 and full-003 (28 minutes apart), and three
single-cell runs, session-01, session-02 and session-03, which exist
only to measure between-session variation. interleaved-001 is the sole
basis for every condition comparison below. The between-session finding
uses the five runs that contain the strictly identical repeat cell
(full-002, interleaved-001, session-01, session-02 and
session-03); full-003 appears only in the withdrawn-claim discussion
and the revision history.
Every number in this section and in the revision history is computed from
the published per-trial CSVs by
tools/render_results.py and pasted as a
block; tests/test_readme_matches_data.py independently recomputes every
table figure from the same files. Nothing here is hand-transcribed.
Gate for flip rate: score ≥ 7. Twenty trials per cell.
| condition | rubric | artifact | n | mean | sd | range | flip rate @ ≥7 [95% CI] |
|---|---|---|---|---|---|---|---|
| repeat | canonical | base | 20 | 5.85 | 0.572 | 5–7 | 0.189 [0.054, 0.421] |
| paraphrase | paraphrase_1 | base | 20 | 6.10 | 0.436 | 5–7 | 0.268 [0.099, 0.461] |
| paraphrase | paraphrase_2 | base | 20 | 6.05 | 0.589 | 5–7 | 0.337 [0.148, 0.486] |
| cosmetic | canonical | variant a | 20 | 6.05 | 0.497 | 5–7 | 0.268 [0.099, 0.461] |
| cosmetic | canonical | variant b | 20 | 6.45 | 0.589 | 5–7 | 0.526 [0.419, 0.500] |
| cosmetic | canonical | variant c | 20 | 6.20 | 0.600 | 5–8 | 0.337 [0.148, 0.486] |
| cosmetic | correctness_only | base | 20 | 6.60 | 0.583 | 6–8 | 0.521 [0.383, 0.500] |
| cosmetic | correctness_only | variant a | 20 | 6.90 | 0.624 | 5–8 | 0.268 [0.099, 0.461] |
| cosmetic | correctness_only | variant b | 20 | 6.60 | 0.860 | 5–8 | 0.521 [0.383, 0.500] |
| cosmetic | correctness_only | variant c | 20 | 7.20 | 0.872 | 6–8 | 0.442 [0.249, 0.500] |
Three point estimates in the table (0.526 and 0.521 twice) sit above the theoretical maximum of 0.5 and above their own interval's upper bound. That is not a typo: the point estimate is the unbiased pair statistic p·f / C(n,2), which at small n can exceed 0.5 when the pass/fail split is near even, while the interval bounds the population disagreement probability 2·π·(1−π), which cannot exceed 0.5. Read such cells as "at or near the maximum possible disagreement", not as a probability above 50%. METHODOLOGY §1 explains this finite-n artefact of the estimator.
The previous revision of this README led with the claim that the
correctness-only rubric made the judge noisier than the canonical rubric
on identical input. That claim did not replicate and is withdrawn —
the second headline claim this project has had to withdraw, after the
cosmetic-edits claim (see the revision history). It was based on comparing
a cell from one sweep (full-002, sd 0.218) against a cell from another
sweep half an hour later (full-003, sd 0.600). The cross-run confound
was disclosed at the time as a threat; it turned out to be the entire
effect. Within interleaved-001, where both rubrics scored the same base
artifact in one shuffled session, the same comparison gives:
-
canonical rubric: sd 0.572; correctness-only rubric: sd 0.583 — a ratio of 1.02×, Levene-style permutation p = 0.283. No detectable spread difference at all.
-
(The means differ under the two rubrics — 5.85 vs 6.60, permutation p = 0.0007 — a level effect, which was never the claim.)
What actually differed between the two sweeps was not the rubric. It was the session — which is the surviving finding.
The strictly identical cell — condition repeat, canonical rubric, base
artifact, same model alias resolving to the same canonical model
(claude-sonnet-5) in every run, the same CLI version wherever it was
recorded (full-002 predates CLI-version recording), same machine — has
now been measured in five separate runs, 100 trials in total, all on 23
August 2026. Ordered by spread, least to most:
| run | started (UTC) | n | mean | sd | range | flip rate @ ≥7 [95% CI] |
|---|---|---|---|---|---|---|
| full-002 | 09:50 | 20 | 6.05 | 0.218 | 6–7 | 0.100 [0.018, 0.361] |
| session-03 | 11:46 | 20 | 5.95 | 0.384 | 5–7 | 0.100 [0.018, 0.361] |
| session-02 | 11:45 | 20 | 5.90 | 0.539 | 5–7 | 0.189 [0.054, 0.421] |
| interleaved-001 | 10:58 | 20 | 5.85 | 0.572 | 5–7 | 0.189 [0.054, 0.421] |
| session-01 | 11:43 | 20 | 5.75 | 0.829 | 4–7 | 0.337 [0.148, 0.486] |
(full-002: start time derived from per-trial timestamps — rows recorded
before v0.2 stored completion time, not start time. Recorded as
timestamp_caveat in that run's _run_metadata.json.)
The central tendency is stable across these sessions; the spread is not.
That contrast is the finding. The five session means span 0.30 of a
point (5.75 to 6.05). The session sds span a factor of 3.80× (0.218 to
0.829): full-002 produced nineteen 6s and one 7 — a near-deterministic
judge — while session-01 produced one 4, seven 5s, eight 6s and four 7s
on the same unchanged input. In the unit a gate actually pays in, the
estimated probability that two evaluations of that one artifact disagree
at a threshold of 7 ranges from 0.100 to 0.337 depending on nothing but
which session you measured in.
The omnibus test, stated so it can be rerun. Pool all 100 scores from
the five sessions. The test statistic is the spread of the per-session
spreads: take each session's population sd, then the population sd of
those five numbers — observed 0.204. Under the null that session labels
are exchangeable, sort the pool (so the result does not depend on the
order the sessions are supplied in), reshuffle it into five groups of 20,
and recompute the statistic 20,000 times under seed 20260823, counting
shuffles whose statistic is at least the observed one (ties counted, the
conservative choice) and reporting the add-one estimate (count + 1) /
(shuffles + 1). It is one-sided by construction: the statistic measures
dispersion among the per-session sds, which only heterogeneity can
inflate. Result: p = 0.0027. The identical test applied to the spread
of the per-session means — same pool, same shuffle count, same seed,
observed statistic 0.100 — gives p = 0.563. The dispersion differs between
sessions; the location does not. The implementation is
omnibus_permutation_p in
tools/render_results.py.
The uneven spacing is not the explanation. The five sessions are not
uniformly spaced: all of them ran inside a window of 1 hour 58 minutes on
a single day, the largest gap between consecutive sessions is 68 minutes,
and session-01, session-02 and session-03 ran back-to-back — 1.8
minutes and 1.9 minutes between consecutive starts and 5.5 minutes end to
end. That invites an obvious objection: perhaps what the omnibus test
detects is drift across the 1 hour 58 minutes, not variation between runs.
It is answerable, because the burst is a subset chosen by timing alone and
fixed before the statistic was computed. Restricting the identical
procedure to session-01, session-02 and session-03 — pool their 60
scores, statistic = population sd of the three per-session sds (0.829,
0.539 and 0.384), observed 0.185, 20,000 shuffles, seed 20260823 — gives
p = 0.014. Spread differs detectably even between runs launched
minutes apart, with no opportunity for drift across hours. What varies is
therefore something that differs from run to run, not something that
accumulates with elapsed time, and the fact that three of the five are
close to a repeated sample of one moment is a strength of the design
rather than a weakness: even a repeated sample of one moment shows it.
Two things that result does not do. It is not independent evidence: it reuses 60 of the 100 scores already used above, so it is the same finding restricted to the subset where the elapsed-time explanation is unavailable, not a replication of it. And it still says nothing about the cause — see the limitations below.
Limitations, stated as plainly as the finding.
-
This is not a controlled study of what drives the variation. Provider load, model serving configuration, cache state and time of day all vary freely between these runs and are mutually confounded. The data establish that stability varies; they identify no cause, and none is claimed.
-
Five sessions on one day is still a small sample. The burst-restricted test is smaller still — three groups of 20, 60 scores — and rests on three of the five sessions. One artifact, one judge model, one provider, one day: nothing here speaks to other days, other load conditions, or other model builds. "Stability varies materially between runs" is what the omnibus tests support. "Judges become unstable over time" is not: in chronological order the per-session sds run 0.218, 0.572, 0.829, 0.539, 0.384, which is not monotonic; no trend over time is tested or claimed.
-
The ordering by sd above happens to also be the ordering by descending mean. That is not offered as a relationship between level and spread — at this many sessions it would not be evidence of one — and it is partly mechanical: the scores pile on 6 with the observed ceiling of 7 just above, so extra dispersion has more room to add low scores than high ones and drags the mean down with it. No such relationship is claimed.
-
It remains, unavoidably, a between-run comparison — the design this project now bans for condition effects (METHODOLOGY §5). It is legitimate here only because the quantity under study is the between-run variation of an identical cell: nothing else varies by construction.
The practical consequence: a noise-floor measurement from one session does not automatically describe the same judge an hour later. Repeat-condition calibration has a shelf life, and any comparison whose cells were collected in different sessions inherits the variation measured above.
At a pass threshold of 7, the estimated probability that two independent evaluations of the same input disagree about the gate ranges from 0.189 [0.054, 0.421] on the repeat cell up to the theoretical maximum of 0.5 (cosmetic / canonical / variant b and the other near-even cells; point estimates above 0.5 are the finite-n artefact footnoted under the table — the population disagreement probability cannot exceed 50%). Because all ten cells ran interleaved in one session, these rates carry no cross-run confound. A CI gate built on a single judge call is, at these rates, partly a coin flip — that conclusion has survived every revision this README has been through.
The cosmetic-edits claim remains withdrawn. An early draft claimed
cosmetic edits significantly moved scores; the two-standard-error rule
behind it was anti-conservative and the claim was withdrawn (revision
history, entry 2). The interleaved run does not resurrect it. Under the
correctness_only rubric — the design's strongest signal, where the judge
has no defence for scoring behaviourally identical variants differently —
the pooled variants sit +0.30 above the base artifact, permutation p =
0.184: not distinguishable from sampling noise. Under the canonical rubric
the pooled variants sit +0.38 above the repeat cell, permutation p = 0.021
(uncorrected for the multiple comparisons this section makes) — but that
rubric scores readability, and identifier names and comment wording are
readability, so a difference there measures sensitivity to
readability-relevant surface form: a real hazard for gates, not proof of
instrument error (METHODOLOGY §2).
Paraphrased rubrics: pooled mean delta +0.23 against the repeat cell, permutation p = 0.215 — not distinguishable from noise. The earlier observation that one paraphrase showed higher spread than the repeat cell (in full-002: sd 0.572 vs 0.218, Levene-style permutation p = 0.0043, uncorrected) did not recur: in the interleaved run that same paraphrase's sd (0.436) is below the repeat cell's (0.572). This is consistent with the between-session finding — the repeat cell's own spread varied across sessions (0.218 to 0.829) by more than any within-run condition effect measured here.
The honest one-line summary: the strongest replicated finding is not about rubrics, rewordings, or cosmetic edits at all — it is that the judge's repeat stability, measured on identical input, varied materially across five sessions while its average answer did not, and that in no configuration tested is a single judge call a sound basis for a pass/fail decision.
One artifact, one judge model, one provider, one day. These numbers describe this configuration and should not be generalised to other models or rubrics without rerunning. The between-session finding now rests on five measurements of the identical cell rather than two — enough to establish that session-to-session stability varies materially and to reject the hypothesis that the five sessions share one spread (p = 0.0027), but not enough to characterise the distribution of session noise floors: all five fall inside a window of 1 hour 58 minutes on one day, unevenly spaced, with no session-level factor controlled. The harness exists so that rerunning is cheap — see METHODOLOGY.md for how to attack these results.
This project measures whether an instrument gives the same answer twice; the record of what its own README has claimed and then had to retract is part of the measurement, and arguably the most useful part. In order:
-
Withdrawn (overclaim, METHODOLOGY): an early draft said condition C "admits no alternative explanation". False under the canonical rubric, which scores readability — renames and comment wording are readability-relevant, so the judge has a defence. Withdrawn; replaced by the two-rubric design (METHODOLOGY §2).
-
Withdrawn (first headline claim): "cosmetic edits significantly move scores", asserted via a two-standard-error rule. That rule is anti-conservative on small discrete cells; the permutation tests that replaced it did not confirm the deltas (canonical pooled, full-002: p = 0.212; correctness-only pooled, full-003: p = 0.169). The related overstatement that rubric rewordings "move the distribution" was withdrawn at the same time.
-
Corrected (two fabricated numbers): the published results table carried flip rates of 0.279 and 0.189 for the paraphrase cells; the values computed from the data are 0.395 and 0.268. 0.279 is not even an achievable value of the estimator at n = 20 — it corresponds to no possible pass/fail split. The cause was hand-transcription, so the fix is structural, not behavioural:
tests/test_readme_matches_data.pynow recomputes every README table figure from the published CSVs and rejects any flip rate no integer split could produce, and this entire section is generated bytools/render_results.pyrather than typed. -
Corrected (false provenance): run full-003 was recorded with a clean git SHA taken from a dirty working tree — naming a commit that could not have produced the run. The exported metadata now marks the SHA
-dirtywith an explanatory note, and the harness records tree dirtiness itself. -
Withdrawn (second headline claim): "the stricter rubric produced the noisier judge", published from a cross-run comparison (full-002 vs full-003) with the confound disclosed. The interleaved run refuted it: within one session the two rubrics' spreads are indistinguishable (sd 0.572 vs 0.583, p = 0.283), while the identical repeat cell differed across the sessions (p = 0.0043). The claim is withdrawn and replaced by the between-session stability finding above; between-run comparison is now recorded in METHODOLOGY §5 as a demonstrated validity threat, and interleaving within a single shuffled run is the required design for any condition comparison.
-
Strengthened (between-session finding, two → five sessions): the between-session result was published from a single pair of runs and caveated as an existence proof that "cannot characterise how often that happens or by how much".
session-01,session-02andsession-03— three further runs of the strictly identical repeat cell, 20 trials each — have been added and published, bringing the finding to five sessions and 100 trials. Across them the per-session sd spans 0.218 to 0.829 (3.80×) while the means span 0.30; the omnibus permutation test on the spread of the per-session sds gives p = 0.0027, and the same test on the spread of the per-session means gives p = 0.563. No previously published statistic was revised: the two-session comparison quoted in entry 5 (p = 0.0043) is one of the pairs the omnibus test now subsumes, and every other figure recomputes unchanged from the same untouched CSVs. Two descriptions did change with the new data: the run count in the opening paragraph, and thefull-002/full-003gap, previously given as "roughly 30 minutes" and now printed as the computed 28 minutes. What changed most is the caveat: the Scope section's "an existence proof (n = 2 sessions), not a characterisation" is withdrawn as superseded — not as wrong, it was accurate for the data it described — and replaced by the limitations stated with the finding above. The sessions are unevenly spaced inside a window of 1 hour 58 minutes on one day — an objection taken up in entry 7 — and the study still does not identify what drives the variation. -
Tested and corrected (spacing objection; two supplied figures wrong): the revision in entry 6 disclosed that the five sessions were unevenly spaced and that drift across that 1 hour 58 minutes window could not be separated from between-run variation. That objection has now been tested rather than left standing. Restricting the identical omnibus procedure to
session-01,session-02andsession-03— launched 1.8 minutes and 1.9 minutes apart, statistic observed 0.185 — gives p = 0.014: spread differs detectably even between runs launched minutes apart. Whatever varies therefore does not need hours to do it, and the near-simultaneity of those three runs is reported above as a strength rather than a weakness — even a repeated sample of one moment shows the effect. It is not independent evidence: it reuses 60 of the 100 scores, and it still identifies no cause. Separately, two figures supplied for entry 6 did not survive recomputation and were corrected before publication, not after: the omnibus p-value was given as 0.0026 and computes to 0.0027 (54 hits in 20,000 shuffles), 0.0026 being unreproducible under the published procedure or any variant of it tried — the nearest drops the pool sort, which would make the p-value depend on the order the sessions are passed in; and the session spacing was described as "roughly fifteen minutes" between the back-to-back runs and "hours" between the others, where the recorded timestamps give 5.5 minutes and 68 minutes. Every timing figure in this section is now computed from the exported metadata for the same reason every score figure is computed from the exported CSVs.
Stated up front because they bound what these results can claim. Fuller
treatment in METHODOLOGY.md.
- Single vendor, in the results. Every number below came from Claude
models through the Claude Code CLI, and says nothing about other
providers. The harness itself is no longer limited that way —
--judge-commandwill drive any judge that can print a JSON score — but nobody has run these conditions against another provider and published the data, so no cross-vendor claim is made here. - One artifact family. All conditions score one rate-limiter implementation and its variants. Instability measured here may be larger or smaller on other code, other languages, or non-code artifacts.
- Sample size. At the default 20 trials per cell (the actual n for a
published sweep is in its
results/published/*_run_metadata.json), flip-rate estimates carry wide confidence intervals — which is why every flip rate ships with one. A measured 0.10 at n=20 is consistent with anything from about 0.02 to 0.36. Treat small deltas between conditions as suggestive, not established. - Temperature is not controllable through the Claude Code CLI, so condition A measures the judge as deployed via this interface, not the model's floor at temperature 0. API users may see different repeat variance.
- Results are model-version-specific and will drift. A sweep is a snapshot of one model build behind an alias on one date. The resolved canonical model, CLI version, and dates are recorded per run; expect numbers to change when the alias moves.
- The noise floor is run-dependent. The repeat condition's spread varied materially across the five sessions measured on identical input, while its mean did not — and it varied that way even between runs launched minutes apart, so this is not slow drift you can outrun by measuring twice in the same sitting (see the between-session finding under Results). A noise floor measured in one run does not automatically describe the next one, and any number in this README is a property of the run that produced it. What makes a run noisy is not established here.
- The judge is a pipeline, not a model. The Claude Code CLI runs with
extended thinking active and invokes a second, smaller model internally
alongside the judge model (both are visible in the response envelope and
disclosed in the report). System prompt and sampling parameters belong to
the CLI (mitigated with
--safe-modeand--tools "", which strip user configuration and tool use, but not eliminated). This is deliberate — it measures the judge as people actually run it — but it means the noise floor includes CLI-side nondeterminism, not just the model's. Prompt-cache hits, by contrast, are not a blind spot: the envelope reports them, flipgate stores them per trial, and the report gives the cold/warm split.
LLM-as-judge is standard practice, not a novelty of this project: Ragas, Braintrust, Langfuse, DeepEval, and promptfoo all ship LLM-judged metrics, and the pattern goes back at least to MT-Bench and the "judging LLM-as-a-judge" literature (Zheng et al., 2023), which documented position bias, verbosity bias, and self-enhancement bias. Prompt sensitivity and sampling variance of LLM outputs are likewise well documented. flipgate does not claim to discover judge instability; it packages a small, reproducible, CI-testable protocol for measuring it on your own judge, with a metric (gate flip rate) expressed in the unit that production pipelines actually pay in.
flipgate.py the harness: sweep runner, gate mode, analysis
(stdlib only, zero dependencies)
pyproject.toml packaging metadata; `flipgate` console entry point
action.yml composite GitHub Action wrapping `flipgate gate`
examples/ annotated config, example rubrics and artifacts,
and a stub judge so the whole path can be tried
without spending anything
tools/render_results.py generates the README Results + revision-history
sections from the published data (no hand-typed
numbers)
samples/ task, scored artifact, verified cosmetic variants
tests/ equivalence proof + unit tests (no network, no CLI)
results/ SQLite DB and reports (gitignored) ...
results/published/ ... except exported per-trial data + run metadata
behind published numbers (tracked)
METHODOLOGY.md experimental design, threats to validity
MIT. See LICENSE.