pub struct GraphConfig {
pub enabled: bool,
pub cache_ttl_hours: u64,
pub max_nodes: usize,
pub max_depth: usize,
}Expand description
Structural graph configuration.
Controls whether the petgraph-backed call graph is built for PR review context, how long cached graphs remain valid, and the maximum blast-radius subgraph size injected into the prompt:
enabled: disabled by default; opt-in via config or CLI flag.cache_ttl_hours: 24 hours balances staleness against rebuild cost for repositories with frequent commits.max_nodes: 50,000 nodes caps the blast-radius subgraph and cache size for very large repositories.max_depth: 4 hops caps the blast-radius BFS traversal depth.
Fields§
§enabled: boolWhether structural graph context is enabled (default: false).
cache_ttl_hours: u64Cache time-to-live in hours before a cached graph is rebuilt (default: 24).
max_nodes: usizeMaximum number of nodes in the blast-radius subgraph (default: 50_000).
max_depth: usizeMaximum BFS hop depth from a modified node in the blast-radius subgraph (default: 4).
Implementations§
Source§impl GraphConfig
impl GraphConfig
Sourcepub fn validate_consistency(&self) -> Vec<String>
pub fn validate_consistency(&self) -> Vec<String>
Validate internal consistency of graph configuration.
Returns a list of warning strings for any misconfigured values.
The caller should emit these warnings via tracing::warn! or similar.
Trait Implementations§
Source§impl Clone for GraphConfig
impl Clone for GraphConfig
Source§fn clone(&self) -> GraphConfig
fn clone(&self) -> GraphConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GraphConfig
impl Debug for GraphConfig
Source§impl Default for GraphConfig
impl Default for GraphConfig
Source§impl<'de> Deserialize<'de> for GraphConfigwhere
GraphConfig: Default,
impl<'de> Deserialize<'de> for GraphConfigwhere
GraphConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GraphConfig
impl RefUnwindSafe for GraphConfig
impl Send for GraphConfig
impl Sync for GraphConfig
impl Unpin for GraphConfig
impl UnsafeUnpin for GraphConfig
impl UnwindSafe for GraphConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more