Skip to content

fix(falkor): strip nul bytes from parameters#1531

Merged
prasmussen15 merged 1 commit into
getzep:mainfrom
he-yufeng:fix/falkor-strip-nul-params
Jun 5, 2026
Merged

fix(falkor): strip nul bytes from parameters#1531
prasmussen15 merged 1 commit into
getzep:mainfrom
he-yufeng:fix/falkor-strip-nul-params

Conversation

@he-yufeng

Copy link
Copy Markdown
Contributor

Summary

Fixes #1525.

FalkorDB rejects query parameters that contain embedded NUL bytes, and the failure happens before the query body runs. Ingested text from PDFs/PPTX can contain stray \x00, so a single bad string can make a whole bulk save query fail.

This strips NUL bytes from FalkorDB query parameters before calling the FalkorDB client. The cleanup is recursive for dict/list/tuple values and is applied in both driver paths that send params:

  • FalkorDriver.execute_query(...)
  • FalkorDriverSession.run(...), including list-of-query batches

Valid strings are unchanged; only \x00 is removed.

To verify

  • $env:DISABLE_KUZU='True'; <pytest bootstrap>; pytest tests/driver/test_falkordb_driver.py::{new and adjacent tests} -q -> 4 passed
  • python -m py_compile graphiti_core\driver\falkordb_driver.py tests\driver\test_falkordb_driver.py
  • python -m ruff check graphiti_core\driver\falkordb_driver.py tests\driver\test_falkordb_driver.py
  • python -m ruff format --check graphiti_core\driver\falkordb_driver.py tests\driver\test_falkordb_driver.py
  • git diff --check

Note: this Windows environment has another editable checkout exposing a top-level tests package, so I used a small bootstrap to point tests at this repository before invoking pytest. DISABLE_KUZU=True avoids importing the optional Kuzu driver for these Falkor-only unit tests.

@prasmussen15 prasmussen15 merged commit ecb521d into getzep:main Jun 5, 2026
8 of 12 checks passed
@prasmussen15

Copy link
Copy Markdown
Collaborator

Hi @he-yufeng — thanks for this fix! 🙏
Before we can keep your contribution in the project, we need you to sign our Contributor License Agreement (CLA). You can read it here:
https://github.com/getzep/graphiti/blob/main/Zep-CLA.md

To sign, just reply to this PR with the following comment, exactly as written:
I have read the CLA Document and I hereby sign the CLA
Once you've signed, we'll restore your change. Thanks again for contributing to Graphiti!

devmao pushed a commit to devmao/graphiti that referenced this pull request Jun 8, 2026
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.

[BUG] FalkorDB: NUL byte (\x00) in a string property fails the whole query with "Failed to parse query parameter '<name>' value"

2 participants