Build a regression suite + diff
A single plune run tells you the state now. To catch quality regressions — checks that used
to pass and no longer do — compare two runs with plune diff.
How the diff works
Section titled “How the diff works”plune diff takes two JSON run outputs (a baseline and a current) and classifies every eval
by its transition. Only a genuine passed → failed transition is a regression:
| Transition | Meaning | Counts as a regression? |
|---|---|---|
passed → failed | a check that used to pass now fails | yes |
failed → passed | improvement | no |
failed → failed | pre-existing failure | no |
errored (current run) | execution error, not a quality change — the eval was not measured | no |
errored → failed | the baseline errored, so there is nothing to compare against — not measured (from 0.34.1) | no |
| no row judged (current run) | every row was blocked or skipped, or the dataset is empty — not measured (from 0.34.4) | no |
An eval is read from its rows: any failed row makes it failed, else any errored row makes it
errored, else any passed row makes it passed. An eval with no judged row at all is not measured.
Snapshot a baseline, then diff against it
Section titled “Snapshot a baseline, then diff against it”-
Save a baseline from a known-good state (e.g.
main). The diff needs JSON, so write it with--format json:Terminal window plune run --format json -o baseline.json -
Make your change — edit the prompt, swap the model, tune an assertion — then capture the current run:
Terminal window plune run --format json -o current.json -
Diff the two.
--fail-on-regressionmakes the command exit non-zero when apassed → failedtransition appears, so a script or CI step can gate on it:Terminal window plune diff baseline.json current.json --fail-on-regression
A Markdown diff is handy for humans; JSON is handy for tooling:
plune diff baseline.json current.json --format markdown -o diff.mdplune diff baseline.json current.json --format json -o diff.jsonThe JSON diff exposes a summary with hasRegression, regressions, and improvements — the same
fields the eval-action reads to drive its PR comment and gate. From
0.34.1 it also carries unmeasured: the evals that errored in the current run, plus those that errored
in the baseline and fail now.
Unsteady rows in the Markdown diff
Section titled “Unsteady rows in the Markdown diff”From 0.39.12, plune diff --format markdown adds one line under its summary when a row of the
current run passed some of its repeats but not all. It names the eval of each such row, with the
mark plune report prints:
Unsteady in this run: `a` · flaky 0.6At most 10 are named, and the rest are counted: , and N more. A current run without repeats, or a
dry run, gets no line. The line is for the reader only: the JSON diff, the gates and the exit code do
not read it, and the baseline’s repeats are not looked at.