Skip to content

feat(ai): keep every benchmark and evaluation run and share it through a run index - #567

Merged
dan-petty merged 1 commit into
release/v0.2.23from
feat/554-run-store
Sep 25, 2026
Merged

dan-petty merged 1 commit into
release/v0.2.23from
feat/554-run-store

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Summary

Benchmarks and evaluations are meant to be repeated over the life of the tool, but only some kept results, each in its own shape, and nothing was shared between workstations. corpus score, ai gateway tune and ai prompt-eval kept nothing.

Run records (ai/run_store.py)

Each run is one JSON file under data.runs_dir/<mechanism>/<run id>.json, the source of truth. It holds:

  • the mechanism, run id and time;
  • the devops-cli version and commit (-dirty with uncommitted source changes);
  • the setup and its fingerprint;
  • the subject and its subject_key;
  • the results.

Both digests depend on content, not key order.

Mechanism Subject Setup
review benchmark corpus digest, target name personas, pre-analysis, concurrency + review setup
review samples validate (per category) sample commits review flag, seed + review setup
review corpus score the corpus's injections review setup when scored
ai gateway tune model group levels, rounds, sizes, each deployment's backend, model, weight, engine, GPUs
ai prompt-eval digest of the persona's recorded verdicts persona
ai benchmark (tasks, suite, embedding; not dry runs) tasks, dataset or document models, provider, servers, concurrency

Review setup is:

  • the analysis and verification models;
  • the page size;
  • for gateway providers, each model group's pool (backend, model, weight, input limit), read from /model/info.

Shared index

A dedicated Valkey, k8s/llm/valkey-runs.yaml, holds the index. It is separate from the in-cluster cache, because the cache's clients (gateway, Portkey, Open WebUI) use no password. It has:

  • a password from the valkey-runs-auth Secret, created out of band;
  • an append-only file on a PVC;
  • noeviction;
  • a NodePort that Kubernetes assigns;
  • its own network policy, which admits only 6379 and allows no egress.

The commands:

  • devops ai runs connect finds the NodePort and copies the password from the Secret into the keyring, never printing it. It then indexes the runs already kept and saves runs.index_url.
  • devops ai runs reindex rebuilds the index from the data directory.

Without an index, runs are kept locally and the command says why. Commands writing JSON announce on stderr, so stdout stays parseable.

Also

  • New settings: data.runs_dir, runs.index_url and runs.index_password (keyring).
  • The collector's NodePort lookup moves to k8s/node_port.py, shared by both connect commands.

Not verified in the cluster

The manifest was checked with kubectl kustomize only. To deploy:

kubectl -n llm create secret generic valkey-runs-auth --from-literal=password="$(openssl rand -hex 32)"
kubectl apply -k k8s/llm
devops ai runs connect

Until the Secret exists, the valkey-runs pod waits in CreateContainerConfigError. Nothing else is affected.

Tests

  • tests/test_run_store.py: 12 tests covering digests, storage, the index, running without an index, reindex, connect (the password reaches the keyring and never the config or output), and the record from each mechanism.
  • New tests in test_review_defects.py and test_review_sample_validation.py.
  • Four JSON tests now parse result.stdout, since the run announcement goes to stderr.

uv run devops ci --force: 13/13 gates pass.

Closes #554

…h a run index

Benchmarks and evaluations are repeated over the life of the tool, but
only some kept results, each in its own shape, and none were shared
between workstations.

Each run is now one JSON record under data.runs_dir: the mechanism, run
id, time, devops-cli version and commit, the setup and its fingerprint,
the subject and its key, and the results. Review benchmarks, sample
validations, corpus scores, gateway tunes, prompt evaluations and AI
benchmarks all write one; review setups record the models, page size
and each gateway pool's backends and weights.

Records are mirrored to a dedicated, password-protected Valkey
(k8s/llm/valkey-runs.yaml: PVC, append-only, noeviction, NodePort).
`devops ai runs connect` finds it and keeps its password in the
keyring; `devops ai runs reindex` rebuilds it from the data directory.
Without it, runs are kept locally and the command says why. JSON output
stays on stdout, with the announcement on stderr.

The collector's NodePort lookup moves to k8s/node_port.py, shared by
`telemetry connect` and `ai runs connect`.

Closes #554
@dan-petty dan-petty added this to the v0.2.23 milestone Sep 25, 2026
@dan-petty dan-petty added type/feature Type feature: a new function scope/ai AI review pipeline, personas, prompts, LLM client, or RAG priority/p1-high Priority P1: high-impact work for the next planned milestone labels Sep 25, 2026
@dan-petty
dan-petty merged commit 9167152 into release/v0.2.23 Sep 25, 2026
7 checks passed
@dan-petty
dan-petty deleted the feat/554-run-store branch September 25, 2026 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority/p1-high Priority P1: high-impact work for the next planned milestone scope/ai AI review pipeline, personas, prompts, LLM client, or RAG type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant