pub struct ContextLedgerStore<'a> { /* private fields */ }Expand description
Loads/saves the per-epoch scc_core::ContextLedger in the store cache
(key ledger:<epoch>, serde JSON).
Implementations§
Source§impl<'a> ContextLedgerStore<'a>
impl<'a> ContextLedgerStore<'a>
Sourcepub fn new(store: &'a Store) -> Self
pub fn new(store: &'a Store) -> Self
Construct the ledger store pinned to the current model epoch.
Sourcepub fn load(&self) -> ContextLedger
pub fn load(&self) -> ContextLedger
Load the visible set for this epoch. An absent or unreadable cache entry yields an empty ledger — never panics, never fabricates.
Sourcepub fn save(&self, ledger: &ContextLedger)
pub fn save(&self, ledger: &ContextLedger)
Persist the ledger for this epoch (best-effort: cache failures never fail the caller).
Sourcepub fn visible_ids(
&self,
) -> (BTreeSet<String>, BTreeSet<String>, BTreeSet<String>, BTreeSet<String>)
pub fn visible_ids( &self, ) -> (BTreeSet<String>, BTreeSet<String>, BTreeSet<String>, BTreeSet<String>)
Kind-scoped id sets of everything visible this epoch:
(symbols, files, components, flows).
Sourcepub fn record_visible(
&self,
symbols: &BTreeSet<String>,
files: &BTreeSet<String>,
components: &BTreeSet<String>,
flows: &BTreeSet<String>,
)
pub fn record_visible( &self, symbols: &BTreeSet<String>, files: &BTreeSet<String>, components: &BTreeSet<String>, flows: &BTreeSet<String>, )
Record what the agent actually saw this epoch. The caller MUST pass kind-scoped sets derived from rendered ids only (audit fix: budget- omitted candidates are never marked visible — the ledger describes the delivered artifact, not the candidate pool). Merges into the existing epoch ledger; best-effort persistence.