[Bug]: Critical Data Loss in Knowledge Graph Layer - add_edge() and link_docs() erase existing entity ntype and props · Issue #271 · codeforstartups/dynavec · GitHub
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Critical Data Loss in Knowledge Graph Layer - add_edge() and link_docs() erase existing entity ntype and props #271
A critical data-loss bug exists in the DynamoDB Knowledge Graph / GraphRAG layer (src/dynavec/graph.py).
When relationship edges or document links are added to existing graph nodes via GraphStore.add_edge() / Dynavec.graph_add_edge() or GraphStore.link_docs() / Dynavec.graph_link(), all previously stored node attributes (ntype and props) are permanently wiped and overwritten with None and {} in DynamoDB.
Root Cause Analysis
In src/dynavec/graph.py (lines 188–206), add_node defines an unconditional UpdateExpression:
Activity
fix(graph): preserve existing node ntype and props in add_node (codef…