Grader: diff-empty
diff-empty passes when the stimulus produced no changes to the workspace — the working
tree at the end of the run is identical to its starting state. This is the canonical check for
no-op evals: did the agent correctly decide that nothing needed changing?
Like the other diff graders, it works for both environment.files and
environment.git starting states (as well as --workspace), and diffs the final workspace
against a baseline commit recorded in a private, throwaway git index just before the agent
ran. Because the diff is git-tracked, the workspace’s own .git directory is excluded and
.gitignore rules are honored, so ignored build output never makes the diff look non-empty.
Taxonomy
Section titled “Taxonomy”| Property | Value |
|---|---|
| Determinism | complex-static |
| Cost | low |
| Reference | reference-free |
| Temporal scope | trajectory-level |
| Score kind | code |
Config
Section titled “Config”graders: - type: diff-emptydiff-empty takes no config.
Behavior
Section titled “Behavior”- Computes the unified diff between the pre-run baseline commit and the final workspace.
- Passes when the diff is empty; fails when any file was added, modified, or deleted.
Limitations
Section titled “Limitations”- Requires the workspace diff to be available.
vally evalruns the agent against a local workspace (--workspace,environment.files,environment.git) and captures the diff during the run, so it is always available there. Relocating backends (e.g. Docker/remote) own their own workspace — they must grade where that workspace lives, or persist the diff for a later re-grade — otherwise the grader fails with a clear message. - Re-grading needs the recorded diff. The baseline is a snapshot of the workspace taken
before the agent runs, so it only exists during the
vally evalpass. That pass persists the resulting diff to the JSONL output — inline (trajectory.diff) or as a sidecar file (trajectory.diffPath) — sovally gradecan re-grade a saved run; point it at the run directory with--run-dirso sidecar paths resolve. Only inputs that never recorded a diff (e.g. ATIF or session-log inputs not produced by a diff-grader eval) have no diff to grade, and the grader fails with a clear message. - The diff is trajectory-level (start of run → end of run).
- Ignored paths are invisible to the diff. The snapshot honors the workspace’s own
.gitignore, and a nested.gitdirectory is recorded as a gitlink rather than its contents. A change to an ignored path (e.g.dist/,.env, logs) or to a file inside a nested repo will not register, sodiff-emptycan pass even though such a file changed. - Requires
giton thePATH. The baseline snapshot shells out togit. Ifgitis missing or the snapshot can’t be captured, the run still proceeds and the grader fails with a clear message rather than aborting the eval.
Evidence examples
Section titled “Evidence examples”✔ Workspace diff is empty✘ Workspace diff is not empty — the stimulus changed the workspace✘ No workspace diff is available for this run. …