Skip to content

The runs root: runs list, runs show, runs rm, runs gc and runs baseline

Catalog static receipts (catalog_eval.v1) are supported too: the subject is the catalog root, and runs show counts skill rows and problems. Point DOKIMI_RUNS_DIR at the dedicated catalog eval output directory to inspect those receipts. Their static pass does not establish a skill's runtime outcome.

Most commands that run an evaluation write their artifacts under results/ by default (a few write elsewhere, listed below). runs list shows what is there, one run's artifacts together, and runs show opens one artifact or one run. Both only read files: no model call, no network access, nothing written. runs rm and runs gc remove runs from the root (below), and runs baseline names a run (baselines).

The runs root is results/ in the working directory. Set DOKIMI_RUNS_DIR to read another directory.

runs list

$ python cli.py runs list
RUN                        SCHEMA           SUBJECT                     MODEL              TIME (UTC)         PATH
20261029T140211Z-3f9a0c1e  arms.v1          onetbb                      gpt-6.1-sol        2026-10-29 14:02   arms/onetbb.json
-                          plugin_delta.v1  onetbb                      gpt-6.1-sol        2026-10-28 10:11*  arms/plugin_delta.json
20261028T093512Z-77c2e0b4  eval.v1          -                           claude-sonnet-5-5  2026-10-28 10:05   onetbb_r7/eval/onetbb.json
20261028T093512Z-77c2e0b4  answers.v1       onetbb                      gpt-6.1-sol        2026-10-28 09:40   onetbb_r7/answers/onetbb.json
-                          novelty.v1       skill:skills/onetbb-tuning  claude-sonnet-5-5  2026-10-27 18:30   novelty/skill_skills_onetbb-tuning/novelty.json

5 artifacts under results/ (* the file's mtime: the artifact records no time)
runs: 2 (3 artifacts); no run_id: 2 (runs show PATH says why)
skipped: 1 JSON with no leading schema_version, 1 JSON of an unknown schema_version (pairwise.v0: 1), 1 not .json
  • Each row is one artifact file. A file is an artifact when its first 256 bytes open with the schema_version of a registered kind: save_artifact has written it as the first key since #27, well inside that. Superseded versions such as questions.v1 count too. Files that open with anything else are skipped without being read in full, so a large file of another kind costs nothing.
  • Subject, model and time come from the artifact's own fields, and which fields depends on the kind: product of a questions set, library_name of an arms run, artifact.ref of a novelty run, repo.id of a reach run, judge_model and evaluated_at of an eval. An artifact that records no subject shows - (an eval, a task run, a reach matrix); nothing is guessed from the path. When an artifact records no time, its file's mtime is used for the order and shown with *. A time that is not ISO 8601 (yesterday) is printed as written, with no *, and the row is placed by the file's mtime.
  • The artifacts of one run are listed together. RUN is the artifact's run_id (below), - when it has none. The runs are newest first, each in the place of its newest artifact, and the artifacts of a run are newest first too. An artifact with no run_id stands on its own, in its place by time. The summary counts the runs and the artifacts with no run_id.
  • Nothing is dropped silently. The summary counts the files skipped, by reason: JSON that does not open with a schema_version (other output, and artifacts saved before #27, which did not put it first), JSON of an unknown schema_version (named), *.tmp and *.rejected files left by save_artifact, other files, entries that are not regular files (a FIFO), symlinked directories and Windows junctions, which are not walked, and symlinks to files outside the root, which are not read. The root's own .baselines/ directory, which holds the baselines, is not walked and not counted. A file or directory that cannot be read is listed as unreadable, as is a file that opens with a registered schema_version but does not parse (a file of no registered kind is never parsed). The text summary names the first one's reason; --json lists all.
  • --kind KIND (repeatable, for example --kind arms --kind eval) and --subject NAME (an exact, case-sensitive match) filter the rows. The rows left are grouped, so a run's place follows the newest of its rows shown.
  • --json prints one cli_output.v1 document (kind runs list) with root, artifacts (in the order of the rows), runs, total (before filtering), skipped, unknown_versions and unreadable under data. Each run has run_id, kinds (sorted) and the paths of its artifacts, in the order of the rows; an artifact with no run_id is in no run. Each artifact has schema_version, kind, run_id, subject, model, generated_at (the time the artifact records, evaluated_at for an eval, reviewed_at for a question panel; null when none), path (relative to the root) and size_bytes. status is partial when unreadable is not empty, and the exit code stays 0.

The run_id is the run envelope's (#277, see the envelope): the files one process writes share it. It is null for a file saved before the envelope, for an input kind such as a question set, and for a run_id that is not a run id (runs show lists the schema error).

What it does not show. Files outside the root are not listed:

  • repo run writes its batches to repo-runs/, and its files carry no schema_version;
  • answers generate and eval score pointwise write to answers/ and eval/ unless --name is given, and eval score panel writes to eval/;
  • eval questions generate and eval questions refine write to questions/, eval questions review and eval questions analyze to reports/, eval personas discover to personas/, repo reach to reach-out/, docs check to baselines/current.json, baseline save to baselines/eval/, tools preference to tool_preference.json and dashboard generate to dashboard.json in the working directory;
  • an output flag can point anywhere.

runs show

$ python cli.py runs show arms/onetbb.json
path:       arms/onetbb.json
kind:       arms (arms.v1)
schema:     valid
subject:    onetbb
model:      gpt-6.1-sol
time:       2026-10-29T14:02:11Z
run_id:     20261029T140211Z-3f9a0c1e
size:       3,503 bytes
contents:   arms: 4, answers: 0
next to it: onetbb.md, plugin_delta.json (plugin_delta.v1)

The path is the one runs list prints, relative to the root. An absolute path, or one from the working directory (results/arms/onetbb.json), works too if it lies inside the root once symlinks are resolved: neither command reads anything outside the root. The artifact is checked against the schema of the version it declares. An artifact that fails the check prints schema: invalid, N errors and each error, and the command still exits 0: runs show reads, it does not gate. A file with no run_id shows - (saved before the envelope), - (an input kind: no envelope), or - (not a run id: see the schema errors). contents gives the length of the lists the kind holds, and next to it the first 20 entries of the artifact's directory. --json prints one cli_output.v1 document (kind runs show) whose data holds the fields of a runs list row plus root, schema, schema_valid, schema_errors, contents, siblings, siblings_total and siblings_error. runs show RUN_ID --json has status partial when unreadable is not empty.

runs show RUN_ID

$ python cli.py runs show 20261028T093512Z-77c2e0b4
run_id:     20261028T093512Z-77c2e0b4
artifacts:  2 (answers: 1, eval: 1)

SCHEMA      SUBJECT  MODEL              TIME (UTC)        PATH
eval.v1     -        claude-sonnet-5-5  2026-10-28 10:05  onetbb_r7/eval/onetbb.json
answers.v1  onetbb   gpt-6.1-sol        2026-10-28 09:40  onetbb_r7/answers/onetbb.json

A run_id from runs list shows the artifacts that carry it, as runs list rows, newest first, with the same * for a time taken from the file's mtime. A file runs show can open (one that opens with the schema_version of a registered kind) wins, and so does a file it cannot read or one that is not a regular file (a FIFO), which gets its error: one of that name under the root, or reached from the working directory and inside the root. The name is read as for any path, under the root first, so a directory there shadows a file of that name in the working directory. A directory of that name (a run's own, results/nightly-7/) does not, nor does a path outside the root or a file under the root that is not an artifact (a text file); when no artifact has the run_id, such a name gets the error it got before. When a file or directory under the root could not be read, the count and the first one are printed, since it may belong to the run; a root that cannot be listed at all exits 2 and says so. --json prints one cli_output.v1 document (kind runs show) whose data holds root, run_id, artifacts (the runs list --json rows) and unreadable.

Removing runs: runs rm and runs gc

A run is what runs list groups: the artifacts that carry one run_id. Removing a run removes those files and nothing else. Files that are not artifacts (the onetbb.md report beside an arms run) stay, and so do the directories, empty or not. An artifact with no run_id (an input kind such as a question set, or a file saved before the envelope) is in no run: only runs rm PATH removes it. Neither command touches a path outside the root. Once a run has a directory of its own (#94 R2), that directory is what a run removes.

$ python cli.py runs rm 20261028T093512Z-77c2e0b4
removed run 20261028T093512Z-77c2e0b4: 2 artifacts, 7,006 bytes

SCHEMA      SUBJECT  MODEL              TIME (UTC)        PATH
eval.v1     -        claude-sonnet-5-5  2026-10-28 10:05  onetbb_r7/eval/onetbb.json
answers.v1  onetbb   gpt-6.1-sol        2026-10-28 09:40  onetbb_r7/answers/onetbb.json
  • runs rm RUN_ID|PATH reads its argument as runs show does: a run_id that some artifact carries, when no artifact file has that name, removes the run; otherwise it is a path, relative to the root or absolute, and the one file there is removed, an artifact or not (a file that does not parse, say). The file must lie under the root once the directories on its path are resolved; a symlink is removed itself, never its target. A directory, a missing file, a path outside the root or a run_id no artifact carries exits 2, and so does a file in .baselines/: runs baseline rm removes a baseline under the baselines' lock, which removing its file or the lock would bypass.
  • runs gc --older-than AGE removes every run whose newest artifact is older than AGE, an age in days such as 30d. The time is the one runs list sorts by: the time the artifact records, or its file's mtime when it records none. A run with one artifact newer than that stays whole.
  • --keep-baselines keeps the runs a baseline holds, and names the baseline: a run a runs baseline pointer points to, and a run whose run_id a copy carries that baseline save listed in baselines/eval/manifest.json (in the working directory). A copy saved before the envelope holds no run. A pointer or a copy that cannot be read, or a copy whose JSON is not an object ([]), exits 2 before anything is removed, since the run it holds is not known. While it removes, gc holds the baselines' lock (.baselines/.lock, made if missing), so a runs baseline save waits and then finds the run gone instead of pointing at it. With --dry-run it reads the pointers under the lock as runs baseline list does.
  • An entry under the root that cannot be read may be the newest artifact of a run, so while one is there runs gc removes nothing and exits 2, naming the first. runs rm RUN_ID removes the run and leaves such an entry in place, counted as runs list counts it.
  • A file is removed only while it holds what was selected: its device, inode, mtime and size, as the scan read it (as runs rm PATH looked it up). A file a writer replaced since (a new run saved at the same path) stays, is named (left in place: 1 file replaced since selected), and the exit code stays 0. A replacement in the instant between that check and the unlink is not caught: nothing locks the root.
  • --dry-run prints the same lines, would remove in place of removed, and removes nothing.
  • --json prints one cli_output.v1 document (kind runs rm or runs gc) with root, dry_run, runs (as in runs list --json), paths and size_bytes (what was removed, or with --dry-run would be), not_removed, changed (the paths kept because they were replaced) and unreadable under data; runs rm adds run_id (null for a file), runs gc adds older_than, keep_baselines and kept (each run_id with its baseline). status is partial when unreadable is not empty (runs rm RUN_ID only).
  • A file that cannot be removed (no permission) is named, the others are still removed (removed run ...: 1 of 2 artifacts, and for gc removed 0 of 1 run ... when a run lost none; it is in not_removed, not in runs, paths or size_bytes), and the command exits 5 (status failed, error.code infra).

Baselines: runs baseline save, list, rm

A baseline is a named pointer to a run, like a git tag (#94 §2.3): the run stays where it is, and the name says which run a later comparison is made against.

$ python cli.py runs baseline save skill/a@main 20261028T093512Z-77c2e0b4
saved baseline skill/a@main -> 20261028T093512Z-77c2e0b4 (2 artifacts); before: none
$ python cli.py runs baseline list
NAME          RUN                        SAVED (UTC)
skill/a@main  20261028T093512Z-77c2e0b4  2026-10-28 11:00

1 baseline under results/
$ python cli.py runs baseline save skill/a@main 20261029T140211Z-3f9a0c1e \
    --expect-previous 20261028T093512Z-77c2e0b4
saved baseline skill/a@main -> 20261029T140211Z-3f9a0c1e (1 artifact); before: 20261028T093512Z-77c2e0b4
  • runs baseline save NAME RUN points NAME at RUN, a run_id that some artifact under the root carries (as runs show RUN_ID finds it); a run_id no artifact carries exits 2. A baseline that exists is moved, and the line says what it held (before:).
  • --expect-previous RUN_ID makes the save a compare-and-swap: it saves only while NAME points to RUN_ID. Otherwise, a baseline that points elsewhere or does not exist, it exits 4 (invalid, a stale baseline, §2.6) and leaves the pointer as it was. A nightly that read the pointer, ran, and saves with the run it read cannot overwrite another nightly's save made in between: of two such saves one wins and the other exits 4. --json then has status failed, verdict invalid, reason stale_baseline, and expected and found (null for no baseline) under data.
  • Names are segments of letters, digits, ., _, @ or - joined by /, so a name can carry a namespace (skill/a@main); each segment starts with a letter or a digit and does not end in ., and the whole is 1-128 characters. A name that Windows reserves for a device (con, nul.txt) is refused, and so is one that differs from a saved one only in case (Main beside main), since Windows and macOS read them as one file.
  • runs baseline list prints every baseline by name, its run and when it was saved. An entry of .baselines/ that is not a pointer is named as unreadable, and --json then has status partial; the exit code stays 0. --json lists name, run_id and saved_at of each under data.baselines.
  • runs baseline rm NAME removes the pointer; the run stays (runs rm RUN_ID removes a run). A baseline that does not exist exits 2, and so does a name that matches a saved one only in case (rm MAIN beside main): it removes nothing. An entry that cannot be read (named as unreadable by list, it stops runs gc --keep-baselines: a link to nothing, a FIFO, a file over 256 bytes, text that is not UTF-8) is removed too, and the line says it held no run id.
  • On disk a baseline is the file .baselines/<NAME> under the root, with / in the name written %2F (.baselines/skill%2Fa@main), holding one line: the run_id; a file over 256 bytes cannot be read. SAVED is its mtime. A save replaces the file in one step, and saves and removals hold .baselines/.lock, so the compare and the swap are one step for every process on the machine (on a network file system only as far as it honours flock). list holds it too (shared, where the platform allows), since Windows refuses to replace or remove a pointer a reader holds open: in a store with no .lock (one written by hand) it makes it, so no first save can replace a pointer it reads. With no .baselines/ it reads nothing and makes nothing; in one where no .lock can be made (read-only) it reads without one, as no save can lock there either. A .baselines that is a link (a symlink or a junction) is neither read nor changed, wherever it leads: every runs baseline command, and runs gc --keep-baselines, exits 2. Through a link out of the root, to the root or to a run's directory, save and rm would write or remove files there. A symlink in .baselines/ is never followed: a pointer that is one is named as unreadable (rm removes it), and a .lock that is one exits 2 (cannot lock).
  • The copies baseline save --from-eval makes under baselines/eval/ are another store: runs baseline does not read or change them. runs gc --keep-baselines keeps the runs of both.

Exit codes

Case Exit
Listed or shown, including an artifact that fails its schema 0
results/ does not exist (runs list prints "no runs") 0
DOKIMI_RUNS_DIR does not exist, or the root is not a directory 2
runs show: no root, a path outside the root (or a symlink that leads out of it), a missing file, a directory, or a file that is not a readable artifact of a registered kind 2
runs show RUN_ID: nothing of that name and no artifact under the root with that run_id (the error counts the entries that could not be read), or a root that cannot be listed 2
runs rm, runs gc: removed, or listed with --dry-run; nothing to remove; runs gc when results/ does not exist 0
runs rm: no root, a directory, a missing file, a path outside the root, a file in .baselines/, or a run_id no artifact carries 2
runs gc: no --older-than, an age that is not days (30d), an entry under the root that cannot be read, or with --keep-baselines a baseline manifest, copy or pointer that cannot be read, or a .baselines/ that cannot be listed or locked (a file, no permission) or is a link 2
runs rm, runs gc: a file that could not be removed 5
runs baseline save, rm: saved or removed; runs baseline list, with no root, no baseline or an entry of .baselines/ that is not a pointer too 0
runs baseline save, rm: no root, a name that is not one or differs from a saved one only in case, a RUN or --expect-previous that is not a run id, a RUN no artifact carries, rm of a baseline that does not exist, a .baselines/ that cannot be locked or listed (a file, no permission) or is a link; runs baseline list: a DOKIMI_RUNS_DIR that does not exist, or a .baselines/ that cannot be listed or locked (a file, a .lock it may not open or that is a link) or is a link 2
runs baseline save --expect-previous RUN_ID: the baseline does not point to RUN_ID (the pointer is left as it was) 4
runs baseline save, rm: the pointer could not be written or removed 5

On a file system that does not lock (flock fails with ENOLCK, as on an NFS mount with no lock daemon), every command that takes .baselines/.lock exits 2 (cannot lock: No locks available): save and rm, and while a .baselines/ is there, list and runs gc --keep-baselines, --dry-run too. list refuses rather than read without the lock, since a read it does not hold the lock for is the one a save on Windows fails on; with no .baselines/ there is nothing to read and it lists no baseline.