Repository navigation
fix: isolate list-form converter metadata - #13779
Merged
Merged
Conversation
List-form converter metadata keeps aliases to each caller dictionary, including repeated entries. Pin the expected per-source copy behavior before changing normalize_metadata().
Deep-copy each list entry so converter output cannot mutate caller metadata, and repeated dictionary entries receive independent copies.
Contributor
|
@lll-hhh is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||
anakin87
approved these changes
Nov 20, 2026
anakin87
left a comment
Member
There was a problem hiding this comment.
Thank you
I pushed a minor simplification
anakin87
enabled auto-merge (squash)
November 20, 2026 16:20
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.
Related Issues
Proposed Changes:
normalize_metadata()for list-form metadata, so converter output no longer aliases the caller's dictionaries.[shared, shared]where copying the list once would still leave both documents sharing nested values.How did you test it?
python -m pytest test/components/converters/test_utils.py test/components/converters/test_textfile_to_document.py test/components/converters/test_multi_file_converter.py -m "not integration" -q->28 passed, 11 deselecteduvx --from ruff==0.16.0 ruff check ...-> passeduvx --from ruff==0.16.0 ruff format --check ...-> passeduvx mypy --python-executable <venv-python> ...-> no issues in 3 source filesuvx pre-commit run --files ...-> passedThe reproduction fails before the fix (
3 failed) and the converter regression test passes after it. On this Windows host, two unrelated integration cases classify CSV asapplication/vnd.ms-excel, so the integration marker was deselected.Notes for the reviewer
The list path previously returned its input unchanged. A single
deepcopy(meta)would still preserve aliases between equal dictionary objects from the caller, so the fix copies per source with[deepcopy(item) for item in meta].This PR was prepared with an AI assistant under the account owner's authorization. The assistant ran the tests listed above; no separate manual line-by-line review is claimed.
Checklist