Skip to content

fix(neo4j): use variable-scoped CALL subquery in :Node backfill (drop deprecation)#22

Merged
colombod merged 1 commit into
mainfrom
fix/backfill-scoped-call-deprecation
Jun 19, 2026
Merged

fix(neo4j): use variable-scoped CALL subquery in :Node backfill (drop deprecation)#22
colombod merged 1 commit into
mainfrom
fix/backfill-scoped-call-deprecation

Conversation

@colombod

Copy link
Copy Markdown
Collaborator

Summary

The :Node backfill in ensure_neo4j_schema used the importing-WITH subquery form CALL { WITH n SET n:Node } IN TRANSACTIONS, which Neo4j 5 deprecates — it emits an 01N00 "CALL subquery without a variable scope clause is deprecated" notification on every backfill run (observed on v4.0.2 schema init). Switched to the variable-scoped form CALL (n) { SET n:Node } IN TRANSACTIONS. Behavior is identical; the deprecation notification is gone.

Change

context_intelligence_server/neo4j_store.py — backfill query:

- MATCH (n) WHERE NOT n:Node CALL { WITH n SET n:Node } IN TRANSACTIONS OF 10000 ROWS
+ MATCH (n) WHERE NOT n:Node CALL (n) { SET n:Node } IN TRANSACTIONS OF 10000 ROWS

Evidence

  • tests/neo4j/test_node_identity_migration.py + tests/neo4j/test_node_index_seek.py: 6 passed (the migration test drives the backfill).
  • The 01N00 CALL-scope deprecation notification no longer appears when the backfill runs (0 occurrences in test output; was emitted on every schema init prior).
  • ruff clean.

… deprecation)

The :Node backfill in ensure_neo4j_schema used the importing-WITH subquery form
`CALL { WITH n SET n:Node } IN TRANSACTIONS`, which Neo4j 5 deprecates — it emits an
01N00 "CALL subquery without a variable scope clause is deprecated" notification on every
backfill run. Switched to the variable-scoped form `CALL (n) { SET n:Node } IN TRANSACTIONS`.
Behavior identical; deprecation notification gone.

Verified: tests/neo4j migration + node-index-seek tests 6 passed, deprecation notification
no longer emitted, ruff clean.

🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier)

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
@colombod colombod merged commit 5561b8d into main Jun 19, 2026
3 checks passed
@colombod colombod deleted the fix/backfill-scoped-call-deprecation branch June 19, 2026 22:23
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.

1 participant