fix(calculators): enforce clinical safety and evidence governance - #2491
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 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. Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #14635 (failure). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_deb1fcb0-0159-4d94-934b-ec7710c6fb7d) |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 79dd00f904
ℹ️ 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".
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_f491d452-9b77-4d99-a1f6-e38afbc2a679) |
|
Final PR summary
GitHub's pre-existing squash auto-merge completed at 2026-09-01T09:45:28Z after the required gate passed. I did not merge the PR or alter auto-merge. |
Summary
Verification
npm run verify:pr-localDuring development, use
npm run verify:cheapas the faster iteration gate before the final PR-local preflight.npm run verify:uiwhen UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changednpm run verify:releasebefore release or handoff confidence claimsVerification not run yet: this draft is intentionally at the TDD red stage. The new test imports the evidence-governed fixture contract and asserts safer behavior that the current implementation does not yet provide. Hosted PR checks are expected to fail until the production commits land.
npm run eval:retrieval:quality(must stay 36/36) when retrieval, ranking, selection, chunking, or scoring behavior changed — not applicable; no retrieval/ranking behavior changes.npm run eval:rag -- --limit 15+npm run eval:quality -- --rag-onlywhen answer generation changed — not applicable.npm run check:production-readinesswhen clinical workflow, privacy, environment, Supabase, source governance, or deployment behavior changed — will be selected by the final verification plan if required.npm run check:deployment-readinesswhen deployment startup, hosting, or rollout behavior changed — not applicable.Risk and rollout
Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes
d3074946a917cac378de64284c67cbc1d4dc58fa.codex/calculators-clinical-safety-governance.Note
High Risk
Changes clinician-facing scoring, catalogue exposure, and suicide-risk messaging—areas where incorrect partial results or management-adjacent copy could mislead care decisions.
Overview
Introduces a binding clinical-safety spec and an evidence registry (
data/calculators/evidence.json) so interpretations, safety flags, and considerations carry claim/source IDs and review metadata.The live catalogue is narrowed to PHQ-9, GAD-7, K10, CAGE, and AUDIT-C; MDQ, SAD PERSONS, and Y-BOCS are quarantined (fail-closed on rights/evidence). Score bands drop deterministic treatment/disposition wording in favor of context-only interpretation; “Score-linked actions” and KB related-content panels are removed in favor of source-linked clinical considerations shown only after completion.
Scoring/UI behavior changes: every item must be answered before bands, copy-to-clipboard, or considerations appear (incomplete is not negative); PHQ-9 item 9 still alerts early; progress copy distinguishes answered vs endorsed. Home, about, and privacy text no longer imply all tools are validated or that nothing is stored app-wide.
Regression coverage adds
tests/calculators-clinical-safety.dom.test.tsxand updates scoring/mode copy tests.Reviewed by Cursor Bugbot for commit 42e9eeb. Configure here.