feat(memory): temporal versioning on graph memory edges#1775
Merged
Conversation
This was referenced Mar 14, 2026
Closed
Add valid_from/valid_until temporal support to graph memory via: - Migration 030: two partial indexes on graph_edges for temporal BFS traversal - GraphStore: edges_at_timestamp(), bfs_at_timestamp(), edge_history() backed by shared bfs_core() helper that eliminates BFS code duplication - graph_recall: optional at_timestamp parameter and temporal_decay_rate scoring (default 0.0 preserves existing behavior unchanged) - GraphFact: valid_from field + score_with_decay() for recency-boosted ranking - GraphConfig: temporal_decay_rate config knob (default 0.0, in default.toml) - recall_graph: propagates at_timestamp and temporal_decay_rate through Closes #1341
37ccb73 to
7036411
Compare
bug-ops
added a commit
that referenced
this pull request
Mar 14, 2026
…ory, bfs_at_timestamp Add 14 unit tests covering boundary conditions and happy paths for three methods added in #1775: - edges_at_timestamp: valid_from==ts inclusive, valid_to==ts exclusive (with ts-1s boundary pair), multiple edges on same entity, no-edge entity - edge_history: basic ordering, limit truncation (with pre-condition proof), non-matching relation, empty entity, fact substring filtering (subset proof) - bfs_at_timestamp: zero hops, expired intermediate blocks traversal, disconnected entity, reverse direction, valid_to==ts exclusive boundary Closes #1776
bug-ops
added a commit
that referenced
this pull request
Mar 14, 2026
…ory, bfs_at_timestamp Add 14 unit tests covering boundary conditions and happy paths for three methods added in #1775: - edges_at_timestamp: valid_from==ts inclusive, valid_to==ts exclusive (with ts-1s boundary pair), multiple edges on same entity, no-edge entity - edge_history: basic ordering, limit truncation (with pre-condition proof), non-matching relation, empty entity, fact substring filtering (subset proof) - bfs_at_timestamp: zero hops, expired intermediate blocks traversal, disconnected entity, reverse direction, valid_to==ts exclusive boundary Closes #1776
bug-ops
added a commit
that referenced
this pull request
Mar 14, 2026
…ory, bfs_at_timestamp (#1784) Add 14 unit tests covering boundary conditions and happy paths for three methods added in #1775: - edges_at_timestamp: valid_from==ts inclusive, valid_to==ts exclusive (with ts-1s boundary pair), multiple edges on same entity, no-edge entity - edge_history: basic ordering, limit truncation (with pre-condition proof), non-matching relation, empty entity, fact substring filtering (subset proof) - bfs_at_timestamp: zero hops, expired intermediate blocks traversal, disconnected entity, reverse direction, valid_to==ts exclusive boundary Closes #1776
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
valid_from/valid_untiltemporal query support to graph memory edgesGraphStoremethods:edges_at_timestamp(),bfs_at_timestamp(),edge_history()with sharedbfs_core()helpergraph_recallgains optionalat_timestampandtemporal_decay_rateparameters (defaults keep existing behavior unchanged)GraphFactgainsvalid_fromfield andscore_with_decay()for recency-boosted rankinggraph_edgesoptimized for temporal BFS traversaltemporal_decay_rateconfig knob in[memory.graph](default 0.0 = disabled)Closes #1341
Test plan
cargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins— 5559 tests passcargo clippy --workspace --features full -- -D warnings— 0 warningscargo +nightly fmt --check— cleanat_timestamp = None+temporal_decay_rate = 0.0produce identical output to previous behavioredges_at_timestamp(ts)returns only edges withvalid_from <= ts AND (valid_to IS NULL OR valid_to > ts)edge_historyreturns all versions of a (subject, predicate) pair including superseded ones