Skip to content

feat(ai): evaluation history, comparison and regression checks (#555) - #571

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

dan-petty merged 1 commit into
release/v0.2.23from
feat/555-run-comparison

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Summary

Resolves #555 by implementing evaluation history queries, setup diffing, metric comparisons, baseline management, and regression evaluation checks under devops ai runs.

Key Changes

  • Run Record Lookups & Management (src/devops_cli/ai/run_store.py):
    • Added get_run(run_id, mechanism=None, root=None) supporting exact and prefix ID resolution with shared Valkey fallback.
    • Implemented set_baseline, get_baseline, and list_baselines with filesystem backing and Valkey mirroring.
    • Added diff_setup(run_a, run_b) detecting configuration shifts across models, weights, page size, and pool deployments.
    • Added compare_runs(base, current) computing absolute and relative metric deltas (wall time, prompt tokens, completion tokens, recall, LLM calls) and backend busy shares (Backend activity in review profiles and benchmarks #557).
    • Added check_regression(comparison, tolerances) assessing metric regression thresholds (max_recall_drop, max_duration_increase, max_tokens_increase).
  • CLI Commands (src/devops_cli/commands/ai_runs.py):
    • devops ai runs list: List recorded runs with optional --mechanism, --subject-key, and --format filters.
    • devops ai runs show <run-id>: Formatted table or JSON representation of run metadata, setup, and results.
    • devops ai runs compare <run-a> [run-b]: Compare two runs or compare a run against its subject baseline.
    • devops ai runs baseline set|list|show: Manage explicit baseline run records.
    • devops ai runs check <run-id>: Gated release evaluation exiting code 1 on regression.
  • Documentation & Tests:
    • Updated CLI reference, ROADMAP, task tracking, and English command help strings.
    • Added comprehensive test suite in tests/test_run_comparison.py adhering to AST complexity caps and structural tuple equality assertions.

Verification

  • uv run pytest tests/test_run_comparison.py tests/test_run_store.py -v: All 22 tests passing.
  • uv run devops scan complexity: Zero violations.
  • uv run devops ci: 100% passing across all quality gates.

@dan-petty
dan-petty merged commit b3ea793 into release/v0.2.23 Sep 25, 2026
7 checks passed
@dan-petty
dan-petty deleted the feat/555-run-comparison branch September 25, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant