Expand description
Property Graph Engine — SQLite-backed code knowledge graph.
Stores nodes (File, Symbol, Module) and edges (imports, calls, defines,
exports) extracted by deep_queries + import_resolver. Provides
efficient traversal queries for impact analysis, architecture discovery,
and graph-driven context loading.
Re-exports§
pub use file_catalog::FileCatalogEntry;
Modules§
- file_
catalog - snapshot
- Versioned, committable graph snapshots — Context-as-Code (GL#451).
Structs§
Enums§
Constants§
- GRAPH_
ENGINE_ VERSION - Property-graph engine generation. Bump whenever edge extraction changes
(e.g. the
type_refedges that connect C#/Java same-namespace consumers to their definers, GH #398) so an existing graph built by an older engine is transparently rebuilt on the next query instead of being served without the new edges. Graphs whosegraph.meta.jsonpredates this stamp deserialize to engine version0, so the first query after an upgrade rebuilds once.
Functions§
- edge_
weight - Weight multiplier per edge kind for impact scoring.
- engine_
outdated truewhen the persisted graph was built by an engine older thanGRAPH_ENGINE_VERSION— or predates the version stamp entirely (missing or unreadable meta) — and must therefore be rebuilt before its edges can be trusted. Callers pair this with a node-count check: an empty graph is rebuilt regardless; a non-empty-but-outdated graph is rebuilt by this gate.- file_
connectivity - Graph connectivity stats for a file: incoming/outgoing edge counts by kind.
- graph_
dir - Resolve the directory for graph.db and graph.meta.json.
- load_
meta - meta_
path - mirror_
index - Reliable, reusable PG build entry (#682.2): open the project’s graph store,
populate_from_project_indexfromindex, and stampgraph.meta.json. - parse_
symbol_ metadata - Inverse of
symbol_metadata: recover the sourcekindandexportedflag from a symbol node’s metadata JSON. The property-graphNodeonly models a coarseNodeKind, so the precise graph_index kind (function,struct, …) and export flag live in this metadata blob — the provider facade must read them back to surface a lossless symbol (#696 C1). Returns(None, None)for absent/malformed metadata so callers can fall back. - populate_
from_ project_ index - Mirror
indexintograph: file nodes + file catalog, symbol nodes (with line spans + kind/export metadata), and structural edges. Clears the code graph first (preserving provider cross-source edges) so the result is a faithful 1:1 representation of the index. - related_
files - Related files for a given path: direct neighbors via any structural edge, sorted by edge weight (strongest relationship first). Returns (path, weight) pairs.
- write_
meta