fix(#030): distinct-document expected-file coverage + stale PR body template cleanup#1204
Conversation
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>
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>
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>
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: 42 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 (5)
✨ 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 |
…distinct-identity-6273 # Conflicts: # docs/outstanding-issues.md Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…distinct-identity-6273 Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…distinct-identity-6273 # Conflicts: # docs/outstanding-issues.md Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…ng check (#1229) * docs(ledger): record prlanded outcomes for PRs #1204, #1215, #1220 Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com> * docs(prlanded): compare trees against the squash commit, not three-dot main 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
Follow-up self-review of the #30/#75 fixes that landed in #1177, run against current
main. Two real defects survived that merge, and both are fixed here.answer.citationscarries one entry per cited chunk, so one combo-titled document arrives several times and still filled both comparison slots. Coverage now dedupes the window by document text.allHitresults depending onexpectedFilesorder. Coverage now assigns sources by maximum bipartite matching.Also linear (was quadratic) label accumulation in
resolveSearchScope, since paging past the 1,000-row cap (#75) means that loop now sees the full label set, plus ledger hygiene: the stale#030/#075recommended-queue row is dropped now that both are archived, the #1177 review row's zero-padded placeholder SHA is corrected by an appended record, and #80 opens the question of re-testing the removed admission-to-discharge widening under approved eval evidence.The third defect found in review — the stale
PR_POLICY_BODY.mdonmain, which madesync-pr-policy-bodyoverwrite each new PR's description with the audit-remediation body (that is how #1177 lost its own) — was fixed here and then landed independently in #1201, so it no longer appears in this diff. This PR's own description surviving intact is the evidence that path is closed.RAG impact: no retrieval behaviour change — eval matching and label bookkeeping only; imputation formulas, comparator key order, alias tiers, clamps, and release ranking are untouched.
Verification
npm run verify:pr-local— pass (lint, typecheck, full unit suite, production build, client-bundle secret scan, offline RAG fixtures 36 golden cases / 21 suites)npm run verify:cheap— pass on the current merged head (3403 passed, 5 skipped)tests/eval-document-matching.test.ts,tests/eval-utils.test.ts,tests/eval-search.test.ts,tests/search-scope.test.ts,tests/rag-imputation-contract.test.tsorigin/main's matcher (expected true to be false,expected false to be true) and pass with the fixnpm run check:branch-review-ledger,npm run check:pr-policy— passeval:retrieval:qualitynot run: no retrieval, ranking, selection, chunking, or scoring behaviour changed — this is eval scoring bookkeeping over already-retrieved sourcesRisk and rollout
expectedFileCoverageis stricter for repeated documents and more permissive where an optimal assignment exists, so multi-slot eval cases can change verdict — in the correct direction in both cases. Single-expectation cases (the majority) are unchanged, sinceanyHitsemantics are identical.fix(#030)commit; the docs commits are independent.Clinical Governance Preflight
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes