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
graph: namespace=null returns stale nodes (deprecated memories, orphaned links) #1189
Store::graph_data(namespace: None) returns GraphStore::all_nodes() unfiltered. Two leakage classes:
Deprecated memories: the namespace-filtered path joins against memories ... AND deprecated = 0, but the unfiltered path (namespace = null) returns nodes whose memory has since been deprecated/forgotten. Orphaned memory nodes never leave the graph.
Stale entity nodes: entity nodes (memory_id IS NULL) are documented as "always included (shared across namespaces)" — that is fine — but memory-linked nodes for memories in other namespaces are also included when no namespace filter is passed, which surprised a consumer expecting namespace=null ≈ "default namespace only".
Observed in sandbox: 320 seeded memories produced a 613-node graph via GET /graph (no namespace) because a second seed run left nodes from the first run in place; nodes had no deprecated-aware cleanup path.
Proposed fix
Filter memory-linked nodes by their parent memory's existence and deprecated = 0 in graph_data regardless of the namespace argument
Optionally add a GET /graph/{id}/prune or maintenance hook to drop nodes whose memory_id no longer resolves
Found during
Corin web audit (2026-09-06), while verifying graph label enrichment (codecoradev/corin#318).
Scope: core · Priority: medium — graph silently grows stale nodes on every forget/deprecate.
Fixed in #1190 (merged 8a28aef): graph_data filters memory-linked nodes by liveness (memory exists AND deprecated = 0) in every path, edges touching removed nodes are dropped, and stats counts the filtered graph.
Activity
fix: graph excludes stale memory nodes + readable node labels (#1189 #…
fix: graph excludes stale memory nodes + readable node labels (#1189 #…
fix: graph excludes stale memory nodes + readable node labels (#1189 #…
ajianaz commentedon Sep 6, 2026
Fixed in #1190 (merged 8a28aef): graph_data filters memory-linked nodes by liveness (memory exists AND deprecated = 0) in every path, edges touching removed nodes are dropped, and stats counts the filtered graph.
chore: release 0.17.0 (#1194)
chore: release v0.22.0 to main (#1603)
chore: release v0.22.1 to main (#1618)