fix(session): trigger semantic indexing for parent directory after memory extraction#429
Merged
MaojiaSheng merged 1 commit intomainfrom Mar 5, 2026
Merged
Conversation
…mory extraction Extracted memories were not searchable because _index_memory() only enqueued the memory file (level 2) to EmbeddingQueue, without triggering SemanticQueue for the parent directory. The hierarchical retriever searches level 0/1 first, so without parent directory .abstract.md/.overview.md being generated and indexed, the search could never discover the directory containing new memories. - Add _enqueue_semantic_for_parent() call in _index_memory() to generate parent directory summaries after every memory indexing operation - Remove duplicate _enqueue_semantic_for_parent() calls from _merge_tool_memory() and _merge_skill_memory() since _index_memory() now handles this uniformly Closes #422 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
zhoujh01
approved these changes
Mar 5, 2026
MaojiaSheng
approved these changes
Mar 5, 2026
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.
Description
Extracted memories were not searchable via vector search because the parent directory's
.abstract.md/.overview.md(level 0/1) were never generated after memory extraction, making them invisible to the hierarchical retriever's global search phase.Related Issue
Fixes #422
Type of Change
Changes Made
openviking/session/compressor.py: Add_enqueue_semantic_for_parent()call in_index_memory()to trigger parent directory semantic generation (.abstract.md/.overview.md) after every memory indexing operation. This ensures the hierarchical retriever can discover the directory at level 0/1 and then drill into level-2 memory files.openviking/session/memory_extractor.py: Remove duplicate_enqueue_semantic_for_parent()calls from_merge_tool_memory()and_merge_skill_memory(), since_index_memory()in the compressor now handles this uniformly for all memory types.Testing
Checklist
Additional Notes
Root cause: The search system uses hierarchical retrieval -- it first searches directory-level summaries (

.abstract.mdat level 0/1), then drills into matched directories to find actual files (level 2). Resource ingestion correctly triggers the fullSemanticQueue -> SemanticProcessorpipeline, but memory extraction only enqueued the memory file itself (level 2) toEmbeddingQueue, skipping the parent directory semantic generation step.