Skip to content

feat(memory): add /graph history command for temporal edge queries#1786

Merged
bug-ops merged 3 commits intomainfrom
research-memory-temporal-edge
Mar 14, 2026
Merged

feat(memory): add /graph history command for temporal edge queries#1786
bug-ops merged 3 commits intomainfrom
research-memory-temporal-edge

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 14, 2026

Summary

  • Adds GraphStore::edge_history_for_entity(entity_id, limit) — fetches all edges (active and expired) for an entity ordered by valid_from DESC, without filtering on valid_to IS NULL
  • Wires the new method to /graph history <name> slash command in graph_commands.rs; each edge is annotated [active] or [expired YYYY-MM-DD]
  • Updates help text in the unknown-subcommand fallback to include /graph history <name>
  • Adds three unit tests: includes expired edges, both directions, respects LIMIT

Closes #1693.

Test plan

  • cargo +nightly fmt --check — clean
  • cargo clippy --workspace --features full -- -D warnings — clean
  • cargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins — 5589 passed, 0 failed

Adds `edge_history_for_entity()` to `GraphStore` which fetches all
edges (active and expired) for an entity ordered by `valid_from DESC`,
and wires it to the `/graph history <name>` slash command in
`graph_commands.rs`. Closes #1693.
@github-actions github-actions bot added enhancement New feature or request size/L Large PR (201-500 lines) documentation Improvements or additions to documentation memory zeph-memory crate (SQLite) rust Rust code changes core zeph-core crate and removed size/L Large PR (201-500 lines) labels Mar 14, 2026
Keep all tests from both branches: issue-1776 temporal tests
(edges_at_timestamp_*, edge_history_*, bfs_at_timestamp_*) merged
with our branch tests (edge_history_for_entity_*).
@github-actions github-actions bot added the size/L Large PR (201-500 lines) label Mar 14, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 14, 2026 21:23
@bug-ops bug-ops merged commit cf69c7d into main Mar 14, 2026
15 checks passed
@bug-ops bug-ops deleted the research-memory-temporal-edge branch March 14, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate documentation Improvements or additions to documentation enhancement New feature or request memory zeph-memory crate (SQLite) rust Rust code changes size/L Large PR (201-500 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

research(memory): temporal edge validity in graph memory (Graphiti/Zep pattern)

1 participant