fix(recall): preserve search summaries on cache hits - #1017
Merged
Conversation
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
TranscriptIndex.lookupreset_last_search_summaryat entry, then returned a cached result before rebuilding that summary. Repeated searches therefore returned the full, byte-identical result body while callers saw no summary and reported zero retrieved passages.Current
devreproduction, using the same index for three identical calls:Change
Each query-cache entry now carries the formatted result and the
SearchResultSummarythat describes it. A cache hit restores a copy of the cached summary before returning the result. The cache keeps its existing size and eviction behavior.The summary is copied both into and out of the cache so the caller-visible private diagnostic object is not the cache's stored snapshot.
After the change, the same reproduction is
10 / 10 / 10while all three result bodies remain 1,683 bytes.Verification
Noneversus the populated summary while the result-body equality assertion still passes.origin/devworktree: four attribution failures from the inherited agent ID, twenty code-index parser/plugin failures, and one model-router plugin-state failure.Boundary
Premium boundary: clear. This changes only an in-process OSS query-cache entry and restores public retrieval accounting. It derives no identity or organization context.
Ref #992