Skip to content

Fix reusable reference filter builders - #2144

Merged
dirkkul merged 2 commits into
weaviate:mainfrom
mameikagou:codex/fix-reusable-ref-filter
Aug 28, 2026
Merged

Fix reusable reference filter builders#2144
dirkkul merged 2 commits into
weaviate:mainfrom
mameikagou:codex/fix-reusable-ref-filter

Conversation

@mameikagou

Copy link
Copy Markdown
Contributor

Fixes #2143.

Reference filter targets were mutated when a terminal filter operation built its path. Reusing either the root reference builder or a derived property builder could therefore fail or reuse altered state.

Build each target path from a deep copy so independent filters do not share mutations.

Validation:

  • test/collection/test_filter.py: 33 passed
  • Ruff check and format passed
  • compileall and diff checks passed

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

Copy link
Copy Markdown

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

@mameikagou
mameikagou marked this pull request as ready for review August 22, 2026 00:29
@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?

@mameikagou

Copy link
Copy Markdown
Contributor Author

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?

I agree

@dirkkul
dirkkul merged commit da39e24 into weaviate:main Aug 28, 2026
125 of 127 checks passed
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.

Filter.by_ref(...) reuse crashes: shared mutable target chain causes AssertionError in _target_path()

3 participants