Skip to content

fix(memory): add edge_history_limit config field to prevent unbounded results#1780

Merged
bug-ops merged 1 commit intomainfrom
fix/edge-history-limit
Mar 14, 2026
Merged

fix(memory): add edge_history_limit config field to prevent unbounded results#1780
bug-ops merged 1 commit intomainfrom
fix/edge-history-limit

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

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

Summary

  • Adds edge_history_limit: usize (default 100) to GraphConfig / [memory.graph] TOML section
  • GraphStore::edge_history() already accepted a limit: usize parameter and had SQL LIMIT clauses, but callers had no config-driven default and were forced to hardcode values
  • Future TUI/API call sites must read config.memory.graph.edge_history_limit instead of hardcoding, preventing unbounded result sets for high-churn predicates

Test plan

  • graph_config_defaults test asserts edge_history_limit == 100
  • graph_config_toml_round_trip snapshot updated to include the new field
  • All 5577 unit tests pass: cargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins
  • cargo clippy --workspace --features full -- -D warnings passes with zero warnings

Closes #1778

@github-actions github-actions bot added documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate bug Something isn't working size/S Small PR (11-50 lines) labels Mar 14, 2026
Adds `edge_history_limit` (default 100) to `[memory.graph]` TOML section.
`GraphStore::edge_history()` already accepted a `limit: usize` parameter
with a SQL LIMIT clause, but callers had no config-driven default and
were forced to hardcode a value. Future TUI/API call sites must read
`config.memory.graph.edge_history_limit` to prevent unbounded result sets
for high-churn predicates.

Closes #1778
@bug-ops bug-ops force-pushed the fix/edge-history-limit branch from 90f764f to 7c3addf Compare March 14, 2026 20:05
@bug-ops bug-ops enabled auto-merge (squash) March 14, 2026 20:05
@bug-ops bug-ops merged commit aad89df into main Mar 14, 2026
15 checks passed
@bug-ops bug-ops deleted the fix/edge-history-limit branch March 14, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core zeph-core crate documentation Improvements or additions to documentation rust Rust code changes size/S Small PR (11-50 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(memory): add LIMIT to edge_history() to prevent unbounded result sets

1 participant