fix(#030, #075): eval alias disjointness + search-scope label pagination - #1177
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>
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Warning Review limit reached
Next review available in:44 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: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ness-030-075-6273 Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Correction: PR description was overwrittenThis PR is not the search-performance work. Diff vs
RAG impact: no retrieval behaviour change — eval matching / label pagination only. Follow-up in progress: harden |
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>
Review assessment + follow-up (complete)Findings fixed on this tip
Verification
RAG impact: no retrieval behaviour change — eval matching / label pagination only. No remaining high-confidence P0–P1 in product scope. Residual: human approving review once required CI finishes on tip |
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…ness-030-075-6273 Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #5327 (success). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
Co-authored-by: Cursor <cursoragent@cursor.com>
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat(ui): streamline clinical sidebar navigation * test(ui): align therapy wiring with sidebar scope * test(ui): align favourites sidebar contract with six-item rail Assert the canonical sidebarToolItems list (Medications/Factsheets) instead of main's retired primarySidebarToolIds Forms/Therapy filter. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * style: format favourites sidebar contract test Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * test(ui): fix guide/settings helpers after sidebar streamlining Tighten mobile menu assertions so Close Clinical Guide menu is not treated as a Guide affordance, and make openGuide reuse an already-open Settings dialog (tablet rail + restore path) instead of clicking through an overlay. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * issues: update #66 with sidebar land proof status Record feature-branch proof on PR #1174 (focused suites, verify:pr-local, ensure spot-check, verify:ui). Remaining work is merge to main. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * issues: pin #66 proof SHA to ledger tip Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * issues: align #66 tip SHA with branch HEAD Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * docs: pin #66 proof to content SHA and record review ledger Cite d97c11e as the content-proof commit for the six-item sidebar land so later ledger-only tip moves do not churn the issue row. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * issues: clean #66 proof wording Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * fix(ci): format outstanding issues ledger * docs: record PR 1174 maintenance * style: prettier-format outstanding-issues after main merge Co-authored-by: Cursor <cursoragent@cursor.com> * fix(test): use RegExp name matcher for Guide & help query Avoid ByRoleOptions exact overload mismatch in favourites-auth-gate DOM test. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(test): disambiguate Medications link in prescribing smoke Use exact name + first() so rail and breadcrumb links do not trip strict mode. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(docs): remove conflict markers from outstanding-issues Take main's #30/#75 closures and keep the #66 six-item progress row. Co-authored-by: Cursor <cursoragent@cursor.com> * docs(review): append babysit ledger rows for #1177 merge Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…mplate cleanup (#1204) * fix(#30): match expected files by distinct document identity The merged #30 fix assigned each expectation to a distinct source position. Positions are not documents: answer.citations carries one entry per cited chunk, so a single combo-titled document arrives several times and could still fill both comparison slots. First-come assignment was also order-dependent -- a document matching two expectations could consume the only source a narrower expectation needed, so the same inputs produced different allHit results depending on expectedFiles order. Dedupe the window by document text and assign sources by maximum bipartite matching, so coverage is both distinct-by-document and order-independent. RAG impact: no retrieval behaviour change -- eval matching only. Also append label rows in place when building labelsByDocument; paging past the 1,000-row cap (#75) means that loop now sees the full label set, where per-row array rebuilds were quadratic. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * chore: remove leftover PR_POLICY_BODY.md after #1153 The sync-pr-policy-body CI job overwrites a pull request description with this file whenever it exists on the head commit. The copy on main holds the audit-remediation body from #1153, so every branch cut from main silently inherits that description -- which is how #1177 lost its own body. Remove it, as #953 did after #939; the job skips cleanly when no template is present. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * docs(issues): record the #30 follow-up and open #80 Drop the stale queue row for #30/#75, which stayed in the recommended queue after both were archived, note the distinct-identity hardening on the #30 archive row, and open #80 to re-test the removed admission-to-discharge widening under approved eval evidence. Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * docs(ledger): append #1177 SHA correction and this review record Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Summary
Two search-correctness fixes (no ranking/retrieval behaviour change):
esolveSearchScope (loadScopeLabels) so matches past the Supabase 1,000-row response cap are not silently dropped.
RAG impact: no retrieval behaviour change — eval matching / label pagination only; imputation formulas, comparator key order, and release ranking are unchanged.
Verification
pm run verify:cheap / local focused suites on this branch
Risk and rollout
Clinical Governance Preflight
Notes