Skip to content

fix(core): edges to deprecated memories no longer count in graph rerank or edge BFS - #1373

Merged
ajianaz merged 1 commit into
developfrom
fix/edges-to-deprecated-readers
Oct 8, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/edges-to-deprecated-readers

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

What

compute_graph_signals (graph rerank, recall_explain) and edge_bfs (related_via_edges, recall --related) join memories and only consider edges whose endpoints are live (deprecated = 0); BFS neither returns nor traverses through a deprecated memory. edges_for (GET /edges) and the supersession ledger are untouched, so history stays visible.

Why

soft_delete_only is the default, so forget/deprecate leaves memory_edges rows pointing at retired memories and nothing removes them. They inflated rerank boosts and let traversal return or pass through retired memories (#1367, graph audit, epic #1345).

Behaviour change

Only the non-default graph recall strategy and --related traversal change; default fusion recall does not read edges. No schema/wire change.

Testing

  • New: deprecated endpoints do not count in signals; BFS skips a deprecated node and does not traverse through it while edges_for still lists the edge (fails on the old code).
  • Test DB helper in graph_rerank now creates a memories table for its fake ids.
  • cargo fmt --check, cargo clippy --workspace --all-targets clean; cargo test --workspace green; vecq-only core build green.
  • Not covered: effect on recall quality of the graph strategy (measured separately in bench: measure recall --strategy graph (LongMemEval) and decide keep/calibrate/retire graph rerank #1369).

Fixes #1367

🤖 Generated with Claude Code

…nk or edge BFS

soft_delete_only is the default, so forget/deprecate leaves memory_edges rows
behind. compute_graph_signals (strategy graph, recall_explain) and edge_bfs
(related_via_edges, recall --related) now only consider live endpoints; the
audit view (edges_for) and the supersession ledger still show the history.

Fixes #1367

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@ajianaz ajianaz added bug Something isn't working scope:core Core engine work labels Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 77f4bf9 into develop Oct 8, 2026
15 checks passed
@ajianaz
ajianaz deleted the fix/edges-to-deprecated-readers branch October 13, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working scope:core Core engine work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(core): memory_edges pointing at deprecated memories pollute rerank, BFS and list

1 participant