eval-action — Getting started
eval-action is a thin GitHub Action that wraps the Plune CLI
(@plune-ai/cli). On every pull request it runs your Plune evals, compares the result against the
base branch, and leaves a single, updated comment with the diff — which evals regressed, which
improved — and can fail the check when a regression appears. It is the Gate step in Plune’s
Generate → Evaluate → Gate flow.
v1.10.11MIT
How it works
Section titled “How it works”On each pull request the Action:
- Runs
plune runon the PR head (the current checkout). - Runs
plune runon the base ref in a detached git worktree, so your checkout is untouched. - Runs
plune diffbetween the two — markdown for the comment, JSON for the outputs and the gate. - Posts (or updates) one sticky PR comment with the diff, and optionally fails the check on a regression.
Quick start
Section titled “Quick start”Add .github/workflows/plune-eval.yml to your repository:
name: Plune eval diff
on: pull_request: branches: [main]
permissions: contents: read pull-requests: write # so the Action can post/update the sticky diff comment
jobs: plune: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 # full history, so the Action can diff the PR against the base branch
- uses: plune-ai/eval-action@v1 with: config: plune.yaml base-ref: main # use-mock: 'true' # default — zero-cost, deterministic, no API key # fail-on-regression: 'true' # uncomment to block merges on a pass→fail regression or an eval that could not be measuredWith the safe defaults it runs on the mock provider — no API key, zero cost, fully
deterministic — and only comments (never blocks merges). You need a plune.yaml in your repository;
see the Plune CLI to create one.
What “regression” means
Section titled “What “regression” means”The diff classifies every eval by its transition between the base branch and the PR. Only a genuine
passed → failed transition is a regression — an eval already failing on the base branch does not
turn the check red.
| Transition | Meaning | Gates? |
|---|---|---|
passed → failed | regression | yes (when fail-on-regression: true) |
failed → passed | improvement | no |
failed → failed | pre-existing failure | no |
| absent → failed | new failure | no |
any → errored | not measured: the PR’s run errored (for example the provider did not answer) | yes, as its own error (when fail-on-regression: true) |
errored → failed | not measured: nothing on the base branch to compare against | yes, as its own error (when fail-on-regression: true) |
errored → passed | improvement | no |
An eval that was not measured is not a regression, but it was not checked either, so “no
regressions” would be a guess. With fail-on-regression: true the check fails with its own message
(Plune could not measure N eval(s)…). A provider that did not answer is cleared by re-running the
job; an eval that errors every time (for example an llm-judge assertion on the mock provider,
which has no judge to ask) keeps the check red until the eval is fixed — the run summary names its
error. has-regression stays false in that case, and the unmeasured output carries the count.
From eval-action v1.8.8 with @plune-ai/cli 0.34.1 or later; an older plune-version reports 0
and the action behaves as before.
Inputs
Section titled “Inputs”| Input | Default | Description |
|---|---|---|
config | plune.yaml | Path to your Plune config (relative to working-directory). |
working-directory | . | Directory to run Plune in. |
base-ref | main | Baseline git ref to compare against. |
use-mock | true | Run on the built-in mock provider (no key, zero cost). Set false to use a real provider. |
fail-on-regression | false | Fail the check (block merge) when a regression is detected, or when an eval could not be measured. |
max-pass-rate-drop-percent | empty (off) | Gate: fail the check when the overall pass rate drops by more than this many percentage points. |
max-cost-usd | empty (off) | Gate: fail the check when the PR run costs more than this many USD. |
max-cost-increase-percent | empty (off) | Gate: fail the check when the PR run costs more than this many percent over the baseline. |
max-tokens | empty (off) | Gate: fail the check when the PR run uses more than this many tokens (input plus output). |
waivers | empty (off) | Path to a waivers YAML file for measured gate failures (relative to working-directory). |
comment | true | Post and update a sticky PR comment with the diff. |
plune-version | 0.39.13 | Version of @plune-ai/cli to install from npm. |
The gate inputs and waivers need a plune-version with the plune diff gates (@plune-ai/cli 0.38.0 or newer).
The action passes each one to plune diff as the flag of the same name; what each gate measures, and why a cost gate
on the mock provider reads «not measured», is in
the gates in GitHub Actions.
Outputs
Section titled “Outputs”| Output | Description |
|---|---|
has-regression | true when at least one regression was detected. |
regressions | Number of regressions. |
unmeasured | Number of evals that could not be measured (their run errored); 0 when everything was measured. |
summary | One-line diff summary. |
gate-exit-code | Exit code of plune diff with fail-on-regression or a gate input set: 0 passed, 1 a measured failure, 2 an input error, 3 not measured. Empty when none is set, or when the base ref has no baseline yet. |
Using a real provider
Section titled “Using a real provider”By default the Action uses the mock provider, so PRs cost nothing and stay deterministic. To
evaluate against a real model, set use-mock: 'false' and provide the provider key from a
repository secret — never hard-code keys:
- uses: plune-ai/eval-action@v1 with: use-mock: 'false' env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}Keys are read only from the environment and are never printed to logs or included in the PR comment.
Fork pull requests
Section titled “Fork pull requests”On PRs from forks, GitHub provides a read-only token, so the Action cannot post a comment. It still
runs the evals and computes the diff; the comment step is skipped with a notice rather than
failing. The Action never uses pull_request_target (which would expose secrets to untrusted PR code).
Versioning
Section titled “Versioning”- The Action tracks a moving
v1tag — pin to it:plune-ai/eval-action@v1. - The Action’s version is independent of the CLI’s. Internally it pins a specific published
@plune-ai/cliversion via theplune-versioninput. The current default lives inaction.yml— check there rather than trusting a number copied into prose. - That pin always references a version already on npm.
License
Section titled “License”MIT © Plune Contributors.