Skip to content

RAG canary: distinguish content, provider, and latency variability#1095

Merged
BigSimmo merged 2 commits into
mainfrom
codex/rag-canary-diagnostics
Jul 23, 2026
Merged

RAG canary: distinguish content, provider, and latency variability#1095
BigSimmo merged 2 commits into
mainfrom
codex/rag-canary-diagnostics

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • persist structured answer-quality JSON and Markdown reports in the canary artifact
  • record GitHub run and tested-tree context in each report
  • classify same-tree content changes separately from provider-route and latency-threshold variability
  • correct the weekly case-count runbook and document the offline comparison command

Why

A byte-identical main tree produced different answer-quality outcomes across live runs. The existing artifact retained logs but not enough stable per-case evidence to distinguish nondeterminism from a deterministic content regression.

Verification

  • npx vitest run tests/eval-quality.test.ts tests/eval-trend.test.ts tests/eval-canary-workflow.test.ts --reporter=dot — 38/38 passed
  • npm run check:github-actions — passed
  • npm run eval:rag:offline — 21 suites, 307/307 passed; 36 golden cases validated
  • npm run check:rag:fixtures — passed
  • npm run verify:cheap — 365 files, 3,235 passed, 1 skipped; lint and typecheck passed
  • git diff --check — passed
  • npm run verify:pr-local -- --dry-run --files ... — selection inspected; full duplicate run not repeated because verify:cheap plus the focused RAG checks covered the selected commands

Risk and rollback

Diagnostics/workflow-artifact change only. The next live run must validate the report content before #51 is closed. Rollback is a plain revert of this commit.

RAG impact: no retrieval behaviour change — only eval report provenance, offline comparison diagnostics, tests, workflow artifact paths, and documentation changed.

Checks not run

  • no live OpenAI/Supabase eval; this PR must land before spending the shared canary budget
  • no production build or browser suite; PR-local selection reports no build-affecting files and there is no app/UI change

Note

Low Risk
Eval diagnostics, workflow artifact paths, and documentation only—no retrieval or answer-pipeline behavior changes; weekly canary cost rises from 8 to 44 generated answers per run.

Overview
Eval canary now writes structured answer-quality JSON/Markdown under .local/eval-canary/quality-reports (uploaded with eval-canary-output), and runbook/docs align the weekly answer gate with the full 44-case committed set (was documented as 8).

Report provenance: eval:quality JSON includes run_context (git_sha, GitHub run id/attempt, latency_context from env) so downloaded artifacts tie outcomes to the tested tree and runner context.

Offline comparison: npm run eval:trend -- --answer-quality compares structured quality reports using stable per-case fingerprints that split content/citation outcomes, provider/route, and latency-threshold signals. Same-SHA divergent content is labeled same_tree_content_variability instead of being read as a code regression; optional --case drills into route, latency, and diagnostic signatures.

Reviewed by Cursor Bugbot for commit 3e3831b. Configure here.

Persist structured answer-quality reports with run context and add stable content, provider, and latency comparison fingerprints. No retrieval or answer behaviour changes.
@supabase

supabase Bot commented Jul 23, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@BigSimmo, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 28 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a11fe8ef-782e-4f98-a4a6-b1d48c7da23d

📥 Commits

Reviewing files that changed from the base of the PR and between 59b9000 and 6f863b0.

📒 Files selected for processing (7)
  • .github/workflows/eval-canary.yml
  • docs/observability-slos.md
  • scripts/eval-quality.ts
  • scripts/eval-trend.mjs
  • tests/eval-canary-workflow.test.ts
  • tests/eval-quality.test.ts
  • tests/eval-trend.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/rag-canary-diagnostics

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3e3831be4a

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

Comment thread scripts/eval-quality.ts
@BigSimmo

Copy link
Copy Markdown
Owner Author

@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. After fixing or dispositioning a thread, reply in that thread with as the first line, followed by a concise summary; that marker authorizes the workflow to close that exact thread. If human input or new authorization is required, do not use the marker and leave the thread open with the blocker. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation.

Export the checked-out SHA so optional-ref canary artifacts cannot be mislabeled as same-tree comparisons.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3e3831be4a

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

Comment thread scripts/eval-quality.ts
@BigSimmo
BigSimmo merged commit c24f2e8 into main Jul 23, 2026
41 checks passed
@BigSimmo
BigSimmo deleted the codex/rag-canary-diagnostics branch July 23, 2026 14:55
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