Commit b0d0f82
fix: resolve KnowledgeGraphNode hash collision due to template rendering bugs
Two bugs in KnowledgeGraphNode caused hash/get_content to ignore actual
entity and relationship data, producing identical outputs for completely
different knowledge graph nodes.
Bug 1: Templates used Jinja2 double-brace syntax ({{ name }}) but were
rendered with Python str.format(), which treats {{ as literal {. All
format kwargs were silently ignored.
Bug 2: _get_relationships_str() used self.entity_template instead of
self.relationship_template, so relationship data never reached the output.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 7eb3e1c commit b0d0f82
1 file changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
201 | | - | |
| 200 | + | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
| 286 | + | |
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| |||
0 commit comments