Commit bb8a092
fix: zero edge loss in enrich — stub nodes for external references + use all edges
Two bugs caused edge loss during Neo4j bulk load in enrich:
1. GraphBuilder.flush() dropped edges whose source/target wasn't in allNodes
(cross-repo refs, external libs, wildcard targets like *:ClassName).
Fix: use enrichedEdges directly instead of flushed.edges(), letting
the stub node creation handle missing targets.
2. EnrichCommand had its own edge loading code (separate from GraphStore.bulkSave)
without stub node creation. Fix: added stub node pre-scan + creation
before edge loading, same pattern as GraphStore.
Also fixed: EnrichCommand graph path now uses config (.code-iq/graph/)
instead of hardcoded .osscodeiq/graph.db.
eShop test: 564 edges → 1,918 edges (179 stub nodes created).
Works with --read-only (stubs created during enrich, not serve).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 2663ac5 commit bb8a092
1 file changed
Lines changed: 44 additions & 8 deletions
Lines changed: 44 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
198 | | - | |
| 199 | + | |
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
| |||
278 | 279 | | |
279 | 280 | | |
280 | 281 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
288 | 324 | | |
289 | 325 | | |
290 | 326 | | |
| |||
0 commit comments