Skip to content

chore: organize dirty work from cursor/search-correctness-030-075-6273 - #1318

Closed
BigSimmo wants to merge 19 commits into
mainfrom
cursor/search-correctness-030-075-6273
Closed

chore: organize dirty work from cursor/search-correctness-030-075-6273#1318
BigSimmo wants to merge 19 commits into
mainfrom
cursor/search-correctness-030-075-6273

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Organized dirty work from cursor/search-correctness-030-075-6273

RAG impact: no retrieval behaviour change — branch cleanup and organisation only.

cursoragent and others added 19 commits July 24, 2026 17:31
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>
Archive the wide-tier dual-alias false-pass and search-scope 1k label
truncation fixes; remove the composite recommended-queue row.

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>
Keep the corrected GitHub PR description without leaving a template
on main that would overwrite later PR bodies (same cleanup pattern
as #942 / #953).

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Append branch-review-ledger entry for the #30/#75 assessment,
distinct-slot/page-budget fixes, and PR_POLICY_BODY cleanup.

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>
Keep loadScopeLabels batching, require ScopeLabelRow.id, close #30/#75
in outstanding-issues, and align order() test expectations with composite
label pagination.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@supabase

supabase Bot commented Jul 28, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 40c90c4d-2aa6-4e25-813a-154f723e3079

📥 Commits

Reviewing files that changed from the base of the PR and between 422e43d and 134b006.

📒 Files selected for processing (7)
  • _resolve1177.py
  • docs/branch-review-ledger.md
  • docs/outstanding-issues.md
  • src/lib/eval-document-matching.ts
  • src/lib/search-scope.ts
  • tests/eval-document-matching.test.ts
  • tests/search-scope.test.ts

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +124 to +128
const matchIndex = topFiles.findIndex(
(file, index) => !usedSourceIndexes.has(index) && alternatives.some((alternative) => file.includes(alternative)),
);
if (matchIndex < 0) return false;
usedSourceIndexes.add(matchIndex);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +124 to +128
const matchIndex = topFiles.findIndex(
(file, index) => !usedSourceIndexes.has(index) && alternatives.some((alternative) => file.includes(alternative)),
);
if (matchIndex < 0) return false;
usedSourceIndexes.add(matchIndex);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@cursor

cursor Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Closing as superseded — no unique product value remains.

Review of this “organize dirty work” tip vs current main found the #30/#75 search-correctness work already landed via merged PRs #1177 / #1204 / #1215 (and later #80 dual-alias restoration). Re-merging this tip would conflict and regress eval-document-matching / search-scope / the issues ledger.

Also dropped: _resolve1177.py (one-off merge helper) and ledger churn.

Consolidation of the six-PR batch → #1335 (docs) and #1336 (secondary nav).

@BigSimmo BigSimmo closed this Jul 28, 2026
@BigSimmo
BigSimmo deleted the cursor/search-correctness-030-075-6273 branch July 30, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants