ci: add deterministic AI regression gate#32
Merged
Conversation
KostasCherv
marked this pull request as ready for review
July 14, 2026 07:59
Owner
Author
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
What
Why
Cortex already has DSPy and DeepEval for model-backed semantic evaluation, but those checks require providers and are not reliable or inexpensive enough for every pull request. This gate reuses the production boundaries and existing evaluation area to catch deterministic AI behavior regressions immediately, without introducing another framework.
Impact
Every backend CI run now produces an auditable score keyed by commit SHA and fails if any case or category falls below 100%. Model-judge evaluation remains manual and complementary.
Checks
uv run python -m src.evals.regression_gate --output reports/ai-regression-local.json— 20/20uv run pytest tests/test_ai_regression_gate.py tests/test_citations.py tests/test_output_parsers.py -q— 24 passeduv run ruff check src/evals/regression_gate.py tests/test_ai_regression_gate.pygraphify update .Limitations
This PR intentionally protects deterministic AI contracts rather than judging free-form model quality. The existing DeepEval/DSPy workflow remains the model-backed semantic evaluation path. Future production failures at these boundaries should be promoted into this dataset.