Skip to content

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.

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:

TransitionMeaningCounts as a regression?
passed → faileda check that used to pass now failsyes
failed → passedimprovementno
failed → failedpre-existing failureno
errored (either side)execution error, not a quality changeno
  1. 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
  2. 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
  3. Diff the two. --fail-on-regression makes the command exit non-zero when a passed → failed transition 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:

Terminal window
plune diff baseline.json current.json --format markdown -o diff.md
plune diff baseline.json current.json --format json -o diff.json

The JSON diff exposes a summary with hasRegression, regressions, and improvements — the same fields the eval-action reads to drive its PR comment and gate.