Skip to content

ci: add deterministic AI regression gate#32

Merged
KostasCherv merged 2 commits into
mainfrom
codex/ai-regression-gate
Jul 14, 2026
Merged

ci: add deterministic AI regression gate#32
KostasCherv merged 2 commits into
mainfrom
codex/ai-regression-gate

Conversation

@KostasCherv

Copy link
Copy Markdown
Owner

What

  • add a versioned 20-case AI contract regression dataset
  • exercise production router parsing, citation provenance/selection, and finance tool selection/planning
  • enforce 100% overall and per-category scores on every PR without credentials or network calls
  • upload a commit-keyed JSON score report as a CI artifact
  • document local execution and extension policy

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/20
  • uv run pytest tests/test_ai_regression_gate.py tests/test_citations.py tests/test_output_parsers.py -q — 24 passed
  • full CI-equivalent backend suite with dummy Supabase configuration — 556 passed
  • uv run ruff check src/evals/regression_gate.py tests/test_ai_regression_gate.py
  • graphify 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.

@KostasCherv
KostasCherv marked this pull request as ready for review July 14, 2026 07:59
@KostasCherv

Copy link
Copy Markdown
Owner Author

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 777e52f150

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@KostasCherv
KostasCherv merged commit fd6d5ea into main Jul 14, 2026
3 checks passed
@KostasCherv
KostasCherv deleted the codex/ai-regression-gate branch July 14, 2026 08:12
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