chore: organize dirty work from cursor/search-correctness-030-075-6273 - #1318
chore: organize dirty work from cursor/search-correctness-030-075-6273#1318BigSimmo wants to merge 19 commits into
Conversation
A single Admission-to-Discharge document was listed under both AdmissionCommunityPts and Discharge, so expectedFileCoverage could set allHit true from one retrieved source. Drop those titles from the admission side and add fail-closed contract tests. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
A single document_labels query could silently drop matches beyond the Supabase 1,000-row response cap. Load labels in deterministic document-batched pages with stable ordering and abort propagation, and cover multi-page >1000 enumeration in unit contracts. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…ness-030-075-6273 Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
expectedFileCoverage now consumes each retrieved top-file at most once so a combo-titled source cannot false-pass multi-slot allHit. Label enumeration fails closed after a bounded page budget instead of looping forever on a stuck full-page API response. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Replace the stale search-performance PR_POLICY_BODY.md leftover on main so Sync PR policy body stops overwriting this PR with unrelated summary text. Template will be deleted in a follow-up commit after the sync job applies it. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Temporary template so Sync PR policy body replaces the stale search-performance description. Delete in the next commit before merge. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…ness-030-075-6273 Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…ness-030-075-6273
…ness-030-075-6273
Co-authored-by: Cursor <cursoragent@cursor.com>
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 22 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. 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: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 134b006b7f
ℹ️ 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".
| const matchIndex = topFiles.findIndex( | ||
| (file, index) => !usedSourceIndexes.has(index) && alternatives.some((alternative) => file.includes(alternative)), | ||
| ); | ||
| if (matchIndex < 0) return false; | ||
| usedSourceIndexes.add(matchIndex); |
There was a problem hiding this comment.
Match distinct document identities, not result indexes
When sources contains multiple chunks or citations from the same document, each array entry receives a different index, so repeated entries for one combo-titled document can still satisfy separate expected slots and make allHit true. This occurs on the existing answer.sources/answer.citations call paths, where multiple chunks may share a document; deduplicate by document identity (or a stable filename identity) before assignment, and add a regression with two chunks from the same combo document.
Useful? React with 👍 / 👎.
| const matchIndex = topFiles.findIndex( | ||
| (file, index) => !usedSourceIndexes.has(index) && alternatives.some((alternative) => file.includes(alternative)), | ||
| ); | ||
| if (matchIndex < 0) return false; | ||
| usedSourceIndexes.add(matchIndex); |
There was a problem hiding this comment.
Find a complete assignment before marking slots missing
When one source matches multiple expectations and another matches only one of them, this greedy findIndex can consume the constrained source first and report a missing file even though a valid distinct-source assignment exists. For example, reversing the admission/discharge expectation order with a combo admission-and-discharge source followed by a discharge-only source produces a false miss; use order-independent bipartite matching and cover the reversed ordering.
Useful? React with 👍 / 👎.
|
Closing as superseded — no unique product value remains. Review of this “organize dirty work” tip vs current Also dropped: Consolidation of the six-PR batch → #1335 (docs) and #1336 (secondary nav). |
Organized dirty work from cursor/search-correctness-030-075-6273
RAG impact: no retrieval behaviour change — branch cleanup and organisation only.