Repository navigation
fix(core): widen rerank reads only for rows without a matched chunk - #1758
Merged
Merged
Conversation
The previous commit read every rerank prefix row's note text as far as the reranker's document limit. A vector-matched row is reranked on its matched chunks, never its body, so vector-only search with an unbounded limit read large note bodies for nothing, the transfer #1746 removed. Only rows the vector leg did not match (hybrid's full-text-only hits) read past the cap now; vector-matched rows always read at it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EQPZkbnuxxtTEJoNJCkt45 Signed-off-by: phernandez <paul@basicmachines.co>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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
Follow-up to #1757, which merged one commit before the fix for Codex's finding on it (#1757 (comment)).
#1757 let every rerank prefix row read its note text as far as
reranker_max_document_chars. A vector-matched row is reranked on its matched chunks, never its body (rerank_document_textprefersmatched_chunk_text). So vector-only search withreranker_max_document_chars=0or above 4,000 read large note bodies for nothing, which brings back the per-query transfer #1746 removed._materialize's wider limit is nowlexical_snippet_limit. It applies only to rows outsidevector_keys: hybrid's full-text-only hits, whose note text is their rerank document.SNIPPET_READ_LIMIT, and vector-only search no longer passes a wider limit._fetch_row_textsreturns early for an empty key list, so the split costs no extra session.Test plan
test_vector_rerank_prefix_keeps_the_read_cap_for_matched_rows: vector search withreranker_max_document_chars=0and a 135 KB embedded note keeps a 4,000-character read. It fails onmain.test_unbounded_reranker_reads_a_lexical_rows_whole_text(from fix(core): read rerank prefix text up to the reranker's document limit #1757) still passes: a full-text-only hit still reaches the reranker past 4,000 characters.just fast-checktests/repository: 1189 passed🤖 Generated with Claude Code
https://claude.ai/code/session_01EQPZkbnuxxtTEJoNJCkt45