Revert "feat(rag): per-candidate saturation-tail primaries" pending retrieval review (#1004)#1005
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EXsJcLrbZUXwnBeG91cVo9
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
📝 WalkthroughWalkthroughThis change reverts Phase C saturation-tail retrieval scoring, removes its exported helpers and tests, updates table-fact scoring and lexical diagnostics documentation, and records the rollback in review documentation. ChangesRetrieval scoring rollback
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/lib/rag/rag.ts (1)
832-840: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winUse 0.5 here, not 0.48.
match_document_chunks_textcapshybrid_scoreat 0.5, so this comment should match the RPC value to avoid confusing thetopScore < 0.5gate.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/rag/rag.ts` around lines 832 - 840, Update the explanatory comment near the topScore gate in the text-only retrieval path to state that match_document_chunks_text caps hybrid_score at 0.5, replacing the outdated 0.48 reference while preserving the rest of the score-contract explanation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/lib/rag/rag.ts`:
- Around line 832-840: Update the explanatory comment near the topScore gate in
the text-only retrieval path to state that match_document_chunks_text caps
hybrid_score at 0.5, replacing the outdated 0.48 reference while preserving the
rest of the score-contract explanation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: acaffb45-a3c8-4dd6-b848-806e79b64e5e
📒 Files selected for processing (5)
docs/branch-review-ledger.mddocs/rag-hybrid-findings-and-todo.mdsrc/lib/rag/rag-candidate-sources.tssrc/lib/rag/rag.tstests/rag-fast-path-ordering.test.ts
Summary
User-requested revert of #1004 (
f96217c): auto-merge fired before the adversarial rag-retrieval-reviewer pass on the diff had reported, so the retrieval path returns to its last fully-reviewed state until that verdict is in. This is the exact single-commit rollback documented in #1004's risk section — pure helpers + two expression sites + one map call; no schema, config, cache, or workflow surface.82426c7— cleangit revertof the squashb5c4eb9— retains the append-only ledger history rows from feat(rag): per-candidate saturation-tail primaries on the text fast path (ADDENDUM 4 Phase C) #1004 (record, not behavior) and adds the revert's own ledger rowStanding evidence, unaffected by this revert: the offline proof of the reverted change (red-proof, 121/121 targeted, envelope tests) remains valid, and the 19:44 UTC post-merge canary dispatched on
f96217ccompletes regardless — it stands as Phase C's live validation datapoint. Re-land decision = reviewer verdict + that canary pair, together.Verification
pr-requiredon this PR re-proves the pre-C baseline (the 5-test fast-path suite shape)Verification not run: local vitest re-run— the revert restores exactly the tree CI validated on main before feat(rag): per-candidate saturation-tail primaries on the text fast path (ADDENDUM 4 Phase C) #1004; hosted CI is the gateRisk and rollout
Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes
🤖 Generated with Claude Code
https://claude.ai/code/session_01EXsJcLrbZUXwnBeG91cVo9
Summary by CodeRabbit
Bug Fixes
Documentation