Skip to main content

apply_compaction

Function apply_compaction 

Source
pub fn apply_compaction(
    ctx: &mut ContextState,
    req: &CompactionRequest,
    verdict: &Value,
) -> Result<CompactionOutcome, String>
Expand description

Fold the summarizer’s verdict into the context: absorb the summary, drop the folded messages, bump the version, evict unreferenced skill bodies (names stay — the caller drops the bodies from its cache), recount. Refuses when the context changed since the plan (version drift).