Repository navigation
feat(ai): evaluation history, comparison and regression checks (#555) - #571
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #555 by implementing evaluation history queries, setup diffing, metric comparisons, baseline management, and regression evaluation checks under
devops ai runs.Key Changes
src/devops_cli/ai/run_store.py):get_run(run_id, mechanism=None, root=None)supporting exact and prefix ID resolution with shared Valkey fallback.set_baseline,get_baseline, andlist_baselineswith filesystem backing and Valkey mirroring.diff_setup(run_a, run_b)detecting configuration shifts across models, weights, page size, and pool deployments.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).check_regression(comparison, tolerances)assessing metric regression thresholds (max_recall_drop,max_duration_increase,max_tokens_increase).src/devops_cli/commands/ai_runs.py):devops ai runs list: List recorded runs with optional--mechanism,--subject-key, and--formatfilters.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.tests/test_run_comparison.pyadhering 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.