Skip to content

[codex] fix batch reference serialization mutation#2040

Open
pragnyanramtha wants to merge 3 commits into
weaviate:mainfrom
pragnyanramtha:codex/batch-reference-idempotent
Open

[codex] fix batch reference serialization mutation#2040
pragnyanramtha wants to merge 3 commits into
weaviate:mainfrom
pragnyanramtha:codex/batch-reference-idempotent

Conversation

@pragnyanramtha
Copy link
Copy Markdown

Summary

  • avoid mutating BatchReference.to_object_collection while converting references to the internal REST payload
  • add coverage that repeated _to_internal() calls preserve the model and produce stable beacons for single-target and multi-target references

Why

BatchReference._to_internal() appended / directly to to_object_collection. Reusing or reserializing the same reference could therefore change Target to Target/ and then emit malformed beacons such as Target//<uuid>.

Validation

  • .venv312/bin/python -m pytest test/collection/test_batch.py -q
  • .venv312/bin/ruff format --check weaviate/collections/classes/batch.py test/collection/test_batch.py
  • .venv312/bin/ruff check weaviate/collections/classes/batch.py test/collection/test_batch.py

Copy link
Copy Markdown

@orca-security-eu orca-security-eu Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@pragnyanramtha pragnyanramtha marked this pull request as ready for review May 17, 2026 01:21
Copilot AI review requested due to automatic review settings May 17, 2026 01:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@weaviate-git-bot
Copy link
Copy Markdown

To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge.

beep boop - the Weaviate bot 👋🤖

PS:
Are you already a member of the Weaviate Forum?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants