Skip to content

fix(recall): preserve search summaries on cache hits - #1017

Merged
laynepenney merged 1 commit into
devfrom
fix/query-cache-search-summary
Aug 28, 2026
Merged

fix(recall): preserve search summaries on cache hits#1017
laynepenney merged 1 commit into
devfrom
fix/query-cache-search-summary

Conversation

@laynepenney

Copy link
Copy Markdown
Member

Problem

TranscriptIndex.lookup reset _last_search_summary at 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 dev reproduction, using the same index for three identical calls:

call  result bytes  chunk blocks
1     1683          10
2     1683          None
3     1683          None

Change

Each query-cache entry now carries the formatted result and the SearchResultSummary that 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 / 10 while all three result bodies remain 1,683 bytes.

Verification

  • Query-cache tests: 4 passed.
  • Hybrid integration plus core tests: 161 passed, 1 expected failure.
  • Mutation control: removing only the cache-hit summary restoration fails the new witness with None versus the populated summary while the result-body equality assertion still passes.
  • Full recall suite: 2,829 passed, 17 skipped, 2 expected failures, and 95 passing subtests. Its 25 host-environment failures were reproduced unchanged on an exact origin/dev worktree: 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

@laynepenney
laynepenney merged commit af83265 into dev Aug 28, 2026
12 checks passed
@laynepenney
laynepenney deleted the fix/query-cache-search-summary branch August 28, 2026 22:04
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant