fix(differentials): retitle "Urgency: urgent" export artifact to "Focused Diagnostic Trap Tables"#500
Conversation
…esentations
The differentials export's focused-diagnostic-trap-tables appendix
(T_Focused_Diagnostic_Trap_Tables.txt) has no title line, so the parser
promoted its first metadata row ("Urgency: urgent") into a presentation
titled "Urgency: urgent" (slug urgency-urgent) with detail routes and
search visibility once presentations became a searchable domain.
Exclude titleless metadata-row entries at three layers sharing one
predicate (isDifferentialMetadataArtifactTitle):
- buildDifferentialSnapshot drops such entries from presentations (their
options remain diagnoses — 4 exist in no other entry) and keeps the
artifact title out of diagnosis currentPresentation.
- usableDifferentialPresentations() is the single source of truth for the
runtime catalogue, seed rows, and stale-row pruning.
- Regenerated the snapshot (31 -> 30 presentations).
Seeding upserts and never deletes, and auto-seed only fires for zero-row
owners, so already-seeded owners keep the stale differential_records row
and its registry corpus document; differentials:seed now prunes stale
seeded presentations and their corpus documents per owner (live Supabase,
operator-run). Tests updated to 30 with regression coverage for the
exclusion and the prune helper.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…artifact-filter-c5aea0 # Conflicts: # src/lib/differentials.ts # src/lib/registry-corpus.ts
…artifact-filter-c5aea0
…cluding it Pivots the "Urgency: urgent" artifact fix from exclusion to a root-cause retitle after the #483 invariant (every diagnosis belongs to a presentation, enforced by differential-detail.test.ts) surfaced: the appendix is the sole parent of 4 diagnoses that exist in no other entry (gad-worry-depressive-rumination, overvalued-idea, psychotic-delusion, ptsd-intrusive-memories-flashbacks), so excluding it orphaned them. parseEntryTitle now falls back to the "=== HEADER ===" text when the first line after the header is a metadata row, titling the entry "Focused Diagnostic Trap Tables" (slug focused-diagnostic-trap-tables) instead of "Urgency: urgent". Reverts the runtime/seed exclusion filters added by the earlier approach; the snapshot stays 31 presentations with all diagnoses parented. staleSeededPresentations still prunes the retired "urgency-urgent" slug (and its corpus document) for already-seeded owners, since the slug changed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…artifact-filter-c5aea0
|
Warning Review limit reached
Next review available in: 13 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Summary
03_individual_entries/T_Focused_Diagnostic_Trap_Tables.txt) has no title line, so the parser promoted its first metadata row,Urgency: urgent, into a presentation titled "Urgency: urgent" (slugurgency-urgent) — with detail routes and, once presentations became a searchable domain, universal-search hits for "urgent".parseEntryTitlenow falls back to the=== HEADER ===text when the first line after the header is a metadata row (detected byisDifferentialMetadataArtifactTitle), so the entry is titled "Focused Diagnostic Trap Tables" (slugfocused-diagnostic-trap-tables) instead of "Urgency: urgent". The snapshot was regenerated (net diff = the retitle +exportedAt; stays 31 presentations).gad-worry-depressive-rumination,overvalued-idea,psychotic-delusion,ptsd-intrusive-memories-flashbacks) exist in no other entry. Excluding it would orphan those diagnoses and break the invariant added by feat(differentials): interactive diagnosis detail page with honest safety snapshot #483 — enforced intests/differential-detail.test.ts— that every diagnosis belongs to a presentation. Retitling fixes the reported bug while keeping all diagnoses parented and that test green.urgency-urgent→focused-diagnostic-trap-tables), and seeding upserts by slug and never deletes, so already-seeded owners keep the olddifferential_recordsrow and its registry-corpus document.npm run differentials:seed -- --owner-id <uuid> --writenow prunes presentation rows whose slug the current snapshot no longer produces (staleSeededPresentations) and their corpus documents. Documented indocs/process-hardening.md.Verification
npm run verify:pr-localnpm run verify:cheap— green (runtime, GitHub-actions pins, CI-scope, sitemap, lint, typecheck, full unit suite incl.differential-detail)npm run format:check— green (required CI gate, separate from verify:cheap)differentials,differential-detail,differentials-route,registry-corpus,cross-mode-links,universal-search,site-map— 91/91Not run and why:
npm run verify:ui— N/A: no UI/routing/styling/browser/component changes. The.tsxdeltas on this branch are inherited frommainvia the catch-up merge, not part of this change's net diff.npm run eval:retrieval:quality— N/A: this change does not alter retrieval, ranking, selection, chunking, or scoring. It renames one catalogue entry and adds a deletion-id helper for pruning; no golden retrieval case is affected. (The gate also needs live Supabase/OpenAI keys, which are provider-gated.)npm run eval:rag/eval:quality— N/A: no answer-generation, synthesis-prompt, or post-processing change.npm run check:production-readiness— provider-gated (live Supabase); not run automatically. No production env, privacy, or deployment behavior changed.Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy) — no Supabase target/env change.Notes
origin/main(through PR perf(db): drop redundant clinical_registry_record_sources_record_idx #491) via two merge commits (never rebased); the only conflicts were additive collisions indifferentials.tsimports andregistry-corpus.tshelper placement, both resolved by keeping both sides.differential-detail.test.tssurfaced the orphaned-diagnosis invariant from feat(differentials): interactive diagnosis detail page with honest safety snapshot #483. History is intended to be squash-merged, collapsing the iteration into one commit.npm run differentials:seed -- --owner-id <uuid> --writefor each already-seeded owner to prune the retiredurgency-urgentrow and its corpus document/chunks.🤖 Generated with Claude Code