fix(modalprocessors): preserve chunk document IDs during extraction - #360
Open
lllleolin-max wants to merge 1 commit into
Open
fix(modalprocessors): preserve chunk document IDs during extraction#360lllleolin-max wants to merge 1 commit into
lllleolin-max wants to merge 1 commit into
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 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.
_create_entity_and_chunkinitially stores the correctfull_doc_idin both chunk stores, then_process_chunk_for_extractionoverwrites the vector record with the chunk ID. For example, a chunk belonging todoc-originalends up pointing tochunk-...in the vector store while its text record still points todoc-original.Preserve
full_doc_idfrom the stored chunk during extraction. Records without that field retain the existing chunk-ID fallback.Validation:
None, plus extraction from a legacy record missing the field. Baseline: 2 failed, 3 passed; fixed: 5 passed (python -m pytest tests/test_modalprocessor_chunk_document_id.py -q).python -m pytest tests -q— 400 passed, 1 skipped.git diff --checkpass on the changed files.The regression tests use recording stores and mocked extraction/merge calls; no external database or LLM service is required.
AI assistance was used to investigate, implement, and test this change.