refactor: honest deriveConfidence naming + drop dead UniversalSearchResponse fields#376
Merged
Merged
Conversation
…esponse fields Two behaviour-neutral cleanups surfaced by the 48h PR review. - rag.ts: rename `strongestCosine` -> `strongestNonSynthetic` in deriveConfidence and correct the comment. The value is the strongest non-synthetic *hybrid* score (scoreValue), not a pure cosine; the old name/comment overstated the guarantee. Same value, same `>= 0.82 && >= 2 citations` gate -> no behaviour change. - universal-search.ts: remove `demoMode`/`publicAccess` from UniversalSearchResponse. runUniversalSearch never sets them; the route attaches them to its untyped JSON response, so the type fields were dead. Verified: tsc --noEmit, eslint (0 errors), full vitest (1289 passed, 1 skipped). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
BigSimmo
enabled auto-merge (squash)
July 8, 2026 06:44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two behaviour-neutral cleanups surfaced by the review of the last 48h of merged PRs.
deriveConfidencenaming (src/lib/rag.ts) —strongestCosineactually holds the strongest non-synthetic hybrid score (scoreValue), not a pure cosine. Renamed tostrongestNonSyntheticand corrected the comment so the code no longer overstates the "genuine cosine" guarantee. Same value, same>= 0.82 && >= 2 citationsgate → no behaviour change.src/lib/universal-search.ts) —runUniversalSearchnever setsdemoMode/publicAccess; the route attaches them to its untyped JSON response. Removed the unused fields fromUniversalSearchResponse.Not in this PR (tracked separately)
owner-scope.ts) → gated on the Supabase Preview drift fix.20260705220000_reconcile_live_database_drift.sqlwas renamed to…230000, orphaning the old version on the remote (supabase migration repair --status reverted 20260705220000 --linked).deriveConfidencestricter pure-cosine gate → needseval:qualityvalidation.tests/ui-tools.spec.ts:756hide-on-scroll flake → needs a Playwright/WebKit run.Verification
tsc --noEmit✅ ·eslint(0 errors) ✅ · fullvitest1289 passed, 1 skipped ✅🤖 Generated with Claude Code