fix(memory): add edge_history_limit config field to prevent unbounded results#1780
Merged
fix(memory): add edge_history_limit config field to prevent unbounded results#1780
Conversation
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
90f764f to
7c3addf
Compare
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
edge_history_limit: usize(default 100) toGraphConfig/[memory.graph]TOML sectionGraphStore::edge_history()already accepted alimit: usizeparameter and had SQLLIMITclauses, but callers had no config-driven default and were forced to hardcode valuesconfig.memory.graph.edge_history_limitinstead of hardcoding, preventing unbounded result sets for high-churn predicatesTest plan
graph_config_defaultstest assertsedge_history_limit == 100graph_config_toml_round_tripsnapshot updated to include the new fieldcargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --binscargo clippy --workspace --features full -- -D warningspasses with zero warningsCloses #1778