pub struct FileFacts {
pub file: String,
pub content_hash: String,
pub has_syntax_errors: bool,
pub nodes: Vec<Node>,
pub contains: Vec<Edge>,
pub references: Vec<Reference>,
pub locals: Vec<LocalBinding>,
pub fields: Vec<FieldBinding>,
pub embeds: Vec<Embed>,
pub trait_impls: Vec<TraitImpl>,
pub scopes: Vec<(NodeId, CorpusScope)>,
pub body_terms: Vec<(NodeId, Vec<String>)>,
}Expand description
Everything extraction produces for one file. Content-addressed: the hash
is the incrementality key — same bytes, same facts. The persisted set of
FileFacts is the source of truth every derived table rebuilds from.
Fields§
§file: StringRepo-relative path.
content_hash: Stringblake3 of the source bytes, hex.
has_syntax_errors: boolTree-sitter reported syntax errors; facts are best-effort partial.
nodes: Vec<Node>File node plus every definition, content-bearing.
contains: Vec<Edge>Structural containment edges (Certain).
references: Vec<Reference>Reference sites: calls, imports. Resolution input.
locals: Vec<LocalBinding>Local bindings that shadow outer names. Resolution suppression input.
fields: Vec<FieldBinding>Declared field types for field-receiver resolution.
embeds: Vec<Embed>Type embeddings (promoted members). Resolution lookup input.
trait_impls: Vec<TraitImpl>Trait-impl blocks. Dynamic-dispatch edge input.
scopes: Vec<(NodeId, CorpusScope)>Node-level scope overrides (sparse): nodes whose role differs from
their file’s path-derived scope, e.g. a Rust #[cfg(test)] module’s
members or a @generated header’s file node.
body_terms: Vec<(NodeId, Vec<String>)>Body-only identifier words per function/method (sparse): words the body uses that the name, signature, and doc do not. Ranking evidence for concept-phrased questions.