Skip to content

feat(eval): --dump-answers artifact for the answer-quality eval (E-3c PR-A)#1031

Merged
BigSimmo merged 2 commits into
mainfrom
claude/clinical-kb-pwa-review-asi3wb
Jul 21, 2026
Merged

feat(eval): --dump-answers artifact for the answer-quality eval (E-3c PR-A)#1031
BigSimmo merged 2 commits into
mainfrom
claude/clinical-kb-pwa-review-asi3wb

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

First of the three E-3c PRs (instrument → short-circuit → figure-aware selection). The run-#58 targeting misses ("no dose figure/regimen", "no schedule/interval") cannot be diagnosed without the actual answer texts — and answers are deliberately not retained at rest (privacy design). This PR adds --dump-answers <path> to eval:answer-quality: per-case {id, question, intent, route, routing_reason, grounded, confidence, citation_count, targeting verdict, answer text, sections} JSON written into the canary artifact directory at eval time.

  • Default off; --json summary output byte-identical; confirmation line only in human mode (the --json-out convention).
  • parseArgs / buildAnswerDumpRecord exported behind an import.meta main-guard (the eval-quality.ts precedent) so tests import without executing the provider-backed eval.
  • The canary's targeting step now passes the flag, so every future answer_quality_eval=true dispatch — including the E-4 pair — yields the texts. Content sensitivity matches the existing tee'd log: all-public corpus, no env values.

The ledger row also records the accepted E-3c design (PR-B: pre-generation validated-extractive short-circuit generalizing the existing LAI pattern, net ~−110 rag.ts lines; PR-C: intent-figure-aware lead promotion with a claim-support nuke-proofing guard).

RAG impact: no retrieval behaviour change — measurement instrument only; no runtime answer path touched.

Verification

  • New tests/eval-answer-quality.test.ts — 4/4 (flag parsing incl. default-off + --json independence; dump-record shape incl. missing-text tolerance)
  • npm run typecheck, npm run check:github-actions, npm run check:ci-scope, eval-canary workflow test, prettier — all clean
  • No provider calls in this PR

Risk and rollout

  • Risk: minimal — an opt-in file write in an eval script plus one workflow arg; the eval's exit code and stdout are unchanged.
  • Rollback: revert.
  • Provider or production effects: none from this diff; the flag only takes effect on explicitly-dispatched canary runs.

Clinical Governance Preflight

  • Source-backed claims still require linked source verification before clinical use — no behaviour change
  • No patient-identifiable document workflow was introduced or expanded — dump content is eval-fixture questions + answers over the all-public corpus, artifact-scoped (30-day retention)
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy) — no access changes
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked: no clinical decision-support behaviour changed — measurement only

🤖 Generated with Claude Code

https://claude.ai/code/session_01EXsJcLrbZUXwnBeG91cVo9


Generated by Claude Code

… PR-A)

Targeting misses ('no dose figure', 'no schedule') cannot be diagnosed
without the answer texts, and answers are deliberately not retained at rest.
The flag writes per-case {question, route, text, sections, targeting} JSON
into the canary artifact dir; default off, --json output byte-identical.
parseArgs/buildAnswerDumpRecord exported behind an import.meta main-guard so
tests import without executing the provider-backed eval. Canary targeting
step wired with the flag.

RAG impact: no retrieval behaviour change - measurement instrument only.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EXsJcLrbZUXwnBeG91cVo9
@supabase

supabase Bot commented Jul 21, 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 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

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

Next review available in: 32 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: 65636190-679f-4f19-8ba3-82ce6012e207

📥 Commits

Reviewing files that changed from the base of the PR and between 49ae361 and 9e1ee93.

📒 Files selected for processing (4)
  • .github/workflows/eval-canary.yml
  • docs/branch-review-ledger.md
  • scripts/eval-answer-quality.ts
  • tests/eval-answer-quality.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/clinical-kb-pwa-review-asi3wb

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

@BigSimmo
BigSimmo marked this pull request as ready for review July 21, 2026 01:25
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@BigSimmo
BigSimmo enabled auto-merge (squash) July 21, 2026 01:25
@BigSimmo
BigSimmo merged commit 4c70ba8 into main Jul 21, 2026
18 checks passed
@BigSimmo
BigSimmo deleted the claude/clinical-kb-pwa-review-asi3wb branch July 21, 2026 01:29
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.

2 participants