pub struct ContextCompiler<'a> {
pub store: &'a Store,
pub view: TrustedGraphView<'a>,
pub settings: ContextSettings,
pub stale_paths: Vec<String>,
/* private fields */
}Fields§
§store: &'a Store§view: TrustedGraphView<'a>Trusted view: the only way this compiler may query the reality graph. STALE facts are excluded and surfaced as warnings; INFERRED facts below the confidence floor are excluded unless explicitly allowed.
settings: ContextSettings§stale_paths: Vec<String>Repository-relative paths whose content hash no longer matches the indexed snapshot (mirrored from the view for cache-key hashing).
Implementations§
Source§impl<'a> ContextCompiler<'a>
impl<'a> ContextCompiler<'a>
pub fn new( store: &'a Store, graph: &'a RealityGraph, settings: ContextSettings, stale_paths: Vec<String>, ) -> Self
Sourcepub fn evidence_map(&self) -> Ref<'_, HashMap<String, Evidence>>
pub fn evidence_map(&self) -> Ref<'_, HashMap<String, Evidence>>
One-query evidence index (id -> Evidence), built lazily. Returns a borrow so callers never copy the full map (hundreds of thousands of rows on large repos).
pub fn revision(&self) -> String
pub fn is_stale_path(&self, path: &str) -> bool
Sourcepub fn evidence_summary(&self, entity_ids: &[String]) -> BTreeMap<String, usize>
pub fn evidence_summary(&self, entity_ids: &[String]) -> BTreeMap<String, usize>
Provenance accounting for a set of entity ids.
Sourcepub fn apply_budget(&mut self, pack: &mut ContextPack, budget: usize)
pub fn apply_budget(&mut self, pack: &mut ContextPack, budget: usize)
Apply the token budget to a pack (P0 rendering contract): the pack
builder has already dropped lowest-priority sections; this records
honest accounting. Critical content is never hard-truncated — if the
minimum safe pack still exceeds the budget, the pack stays complete
and exceeded_soft_budget is set instead of silently cutting facts.
pub fn system_overview(&self) -> ContextPack
Sourcepub fn system_atlas(&self, budget: Option<usize>) -> ContextPack
pub fn system_atlas(&self, budget: Option<usize>) -> ContextPack
Full System Atlas (Wave 2): the startup architecture artifact. Cached under the model epoch + stale set like task packs — a stale atlas is never served. The pack render guarantees fit: dropped and line-truncated sections are recorded, never silent.
Sourcepub fn system_atlas_scoped(
&self,
budget: Option<usize>,
scope: AtlasScope,
full: bool,
) -> ContextPack
pub fn system_atlas_scoped( &self, budget: Option<usize>, scope: AtlasScope, full: bool, ) -> ContextPack
[system_atlas] with an explicit scope. The scope is part of the
cache key: production and full compilations never share entries.
pub fn task_context( &self, goal: &str, files: &[String], symbols: &[String], token_budget: Option<usize>, ) -> ContextPack
Sourcepub fn task_context_with_rankers(
&self,
goal: &str,
files: &[String],
symbols: &[String],
token_budget: Option<usize>,
scorer: Option<&dyn SemanticScorer>,
reranker: Option<&dyn Reranker>,
) -> ContextPack
pub fn task_context_with_rankers( &self, goal: &str, files: &[String], symbols: &[String], token_budget: Option<usize>, scorer: Option<&dyn SemanticScorer>, reranker: Option<&dyn Reranker>, ) -> ContextPack
task_context with optional semantic scorer and reranker (SCC-071).